Question about Clustergram colors
3 views (last 30 days)
Dear Matlab Users,
I have a problem understanding which part of clustergram function I need to modify to adapt it to my input data. I have two columns of data ranging from 0-100 (percentage values) in two conditions, and I would like to apply clustergram to visualize how the variables correlate in these two conditions. So some variables (rows) will have low percentage in both conditions, some high in one condition and low in the other one and so on. When I apply basic clustergram function, I receive the following graph.
s= clustergram(vars(:,1:2),'ColumnPdist', 'correlation');
Based on the nature of my data I don't have any negative values (no green), and many values more than the default 'DisplayRange' of 3. Therefore I am limited to what appears to be solid red and black.
Could you please help me understand which parameters of the clustergram function I need to change in order to get instead of this a gradient of green and red colors for my data?
Thank You in advance,
yi li on 29 Sep 2018
Maybe you can adjust your original data before you using clustergram. That is mean you can do data translation. You can get the middle value of your data, then let original data to minus this value. At last, you can use this new data to clustergram and you will get what you wanted.