Hi everyone,
I am trying to create a heatplot for my below dataset:
In short, the data is about how individuals "jump" from one position to another. The number in the boxes represent the percentage of jumps within and between positions. For e.g., From "1" to "1" there are 0.5% transitions.
I use the following code for the heatplot:
I get the following graph.

As you can see the color codes for most of the values is almost the same, especially for those from 0 to 2.4. The graph is not intuitive in the given form.
Is there any way I can assign a color code for a specific value? Since there are exactly 12 values from low to high ( 0 being the min and 43.609 being the highest), can I code the colors from the lowest number (the lightest color) to the highest number (the darkest color)? I would like to have it in grayscale.
Would really appreciate any help.
Thanks in advance,
J
I am trying to create a heatplot for my below dataset:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input byte(step_one step_two) int total_steps float total_steps_percent 1 1 4 .5012531 1 2 2 .25062656 1 3 0 0 1 4 0 0 2 1 0 0 2 2 117 14.661654 2 3 18 2.255639 2 4 11 1.378446 3 1 0 0 3 2 17 2.1303258 3 3 244 30.57644 3 4 16 2.0050125 4 1 0 0 4 2 7 .877193 4 3 14 1.754386 4 4 348 43.60902 end
I use the following code for the heatplot:
Code:
heatplot total_steps_percent i.step_one i.step_two, sizeprop values(format(%9.3f) size(vsmall)) legend(on) aspectratio(1) color(cblind ,gscale intensity(.7) reverse) xscale(alt) yscale(reverse) xtitle("") ytitle("")
As you can see the color codes for most of the values is almost the same, especially for those from 0 to 2.4. The graph is not intuitive in the given form.
Is there any way I can assign a color code for a specific value? Since there are exactly 12 values from low to high ( 0 being the min and 43.609 being the highest), can I code the colors from the lowest number (the lightest color) to the highest number (the darkest color)? I would like to have it in grayscale.
Would really appreciate any help.
Thanks in advance,
J
Comment