Dear Stata users,
I have an apparently minor issue with the finalization of a Kernel density graph.
I produced the graph with the following code:
I would like to plot against the var. "sodtotale" the lines associated wit different categories of "soddgeneral", and then to associate to each line one different tone of black-and-grey and style (so to make possible to distinguish the final six lines without using colors other than black and grey).
Everything is fine, expect for the first line (associated with sodd_general == 0), where I am not able to add the -lcolor- and -lpattern- options (I guess Stata does not allow to use them with the command -kdensity-).
Do you have any clue about that?
Thanks for your support, best, G.
I have an apparently minor issue with the finalization of a Kernel density graph.
I produced the graph with the following code:
Code:
kdensity sodtotale if (sodd_general ==0 ) , plot(kdensity sodtotale if(sodd_general == 2 ), lcolor (black) lpattern(dash) || /// kdensity sodtotale if (sodd_general == 4 ), lcolor (grey) lpattern(dot) || /// kdensity sodtotale if (sodd_general ==6 ), lcolor (gs11) lpattern(dot) || /// kdensity sodtotale if (sodd_general ==8 ) || /// kdensity sodtotale if (sodd_general ==10 )) /// title("Soddisfazione generale") /// legend(ring(0) pos(11) size(small) /// label(1 "0") label(2 "2") label(3 "4") label(4 "6") label(5 "8") label(6 "10")) /// ylabel (0.0(0.02)0.12) /// name(gen, replace)
Everything is fine, expect for the first line (associated with sodd_general == 0), where I am not able to add the -lcolor- and -lpattern- options (I guess Stata does not allow to use them with the command -kdensity-).
Do you have any clue about that?
Thanks for your support, best, G.
Comment