Dear Stata users,
I am trying to create a heatmap and would like to include vertical spacing on the y-axis. However, I have been unable to achieve this. I would greatly appreciate any advice or suggestions on how to accomplish this.
To illustrate what I am aiming for, I have included a picture that I produced in PowerPoint as an example of how it should look. The data and code is provided below.
Thank you in advance for your help!
Best,
Mario Liebensteiner
I am using this example dataset:
country value sort_h
FR .66 3
FR .55 2
FR .22 1
AT .77 3
AT .44 2
AT .11 1
My code is:
heatplot value i.sort_h country, ///
cuts(0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1) keylabels(, interval) ///
yscale(noline) ///
ylabel( 1 "ref" 2 "value 1" 3 "value 2" , nogrid) ///
xlabel(, nogrid) ///
color(inferno, reverse) ///
xtitle("") ytitle("")
I am trying to create a heatmap and would like to include vertical spacing on the y-axis. However, I have been unable to achieve this. I would greatly appreciate any advice or suggestions on how to accomplish this.
To illustrate what I am aiming for, I have included a picture that I produced in PowerPoint as an example of how it should look. The data and code is provided below.
Thank you in advance for your help!
Best,
Mario Liebensteiner
I am using this example dataset:
country value sort_h
FR .66 3
FR .55 2
FR .22 1
AT .77 3
AT .44 2
AT .11 1
My code is:
heatplot value i.sort_h country, ///
cuts(0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1) keylabels(, interval) ///
yscale(noline) ///
ylabel( 1 "ref" 2 "value 1" 3 "value 2" , nogrid) ///
xlabel(, nogrid) ///
color(inferno, reverse) ///
xtitle("") ytitle("")
Comment