Dear all,
I am currently using the following code:
twoway (tsline var1_1) (tsline var1_2) (tsline var1_3) (tsline var1_4), legend(off)
graph save var1
twoway (tsline var2_1) (tsline var2_2) (tsline var2_3) (tsline var2_4), legend(off)
graph save var2
twoway (tsline var3_1) (tsline var3_2) (tsline var3_3) (tsline var3_4), legend(off)
graph save var3
twoway (tsline var4_1) (tsline var4_2) (tsline var4_3) (tsline var4_4), legend(off)
graph save var4
graph combine var1.gph var2.gph var3.gph var4.gph, note("Blue group 1" "Red group 2" "Green group 3" "Yellow group 4")
This produces 4 graphs for respectively variables var1-var4. Each graph shows 4 tslines of the respective variable for 4 different groups/subsamples of my dataset.
Because the legend (explaining which color stands for which of the four graphs) would be the same for all 4 graphs, I omit the legend and then add the explanations in the final combined graph.
Now I have the following questions:
(1) Rather than adding the legend substitute with "note" at the end, in which case it does not visually display the respective color, is there a better way to ensure that the legend is not shown in each separate graph, but is shown in the same way in which it would be shown there just in the final combined graph??
(2) Groups 1 and 2 are related as are groups 3 and 4. Therefore I would like to show groups 1 and 2 in the same color, and show groups 3 and 4 in another common color (ideally one that will look different from color 1 when printed in black and white). Then I would like to display 1 and 3 in solid and 2 and 4 in closely dotted lines. How do I do this? I found the option -cl- for color but
twoway (tsline var1_1, cl(blue)) (tsline var1_2) (tsline var1_3) (tsline var1_4), legend(off)
would not work.
Can anyone help here?
Thank you so much and kind regards,
Peter
I am currently using the following code:
twoway (tsline var1_1) (tsline var1_2) (tsline var1_3) (tsline var1_4), legend(off)
graph save var1
twoway (tsline var2_1) (tsline var2_2) (tsline var2_3) (tsline var2_4), legend(off)
graph save var2
twoway (tsline var3_1) (tsline var3_2) (tsline var3_3) (tsline var3_4), legend(off)
graph save var3
twoway (tsline var4_1) (tsline var4_2) (tsline var4_3) (tsline var4_4), legend(off)
graph save var4
graph combine var1.gph var2.gph var3.gph var4.gph, note("Blue group 1" "Red group 2" "Green group 3" "Yellow group 4")
This produces 4 graphs for respectively variables var1-var4. Each graph shows 4 tslines of the respective variable for 4 different groups/subsamples of my dataset.
Because the legend (explaining which color stands for which of the four graphs) would be the same for all 4 graphs, I omit the legend and then add the explanations in the final combined graph.
Now I have the following questions:
(1) Rather than adding the legend substitute with "note" at the end, in which case it does not visually display the respective color, is there a better way to ensure that the legend is not shown in each separate graph, but is shown in the same way in which it would be shown there just in the final combined graph??
(2) Groups 1 and 2 are related as are groups 3 and 4. Therefore I would like to show groups 1 and 2 in the same color, and show groups 3 and 4 in another common color (ideally one that will look different from color 1 when printed in black and white). Then I would like to display 1 and 3 in solid and 2 and 4 in closely dotted lines. How do I do this? I found the option -cl- for color but
twoway (tsline var1_1, cl(blue)) (tsline var1_2) (tsline var1_3) (tsline var1_4), legend(off)
would not work.
Can anyone help here?
Thank you so much and kind regards,
Peter
Comment