Reputation: 125
I'm trying to create a twoway line graph in Stata that, because it will likely be photocopied and/or printed in black & white, we need to use dashed and dotted lines to differentiate between lines. The problem is that Stata's dotted line looks awful, it's not a dot at all, but a vertical line. I can't figure out any way to change the default symbol for a dotted line from a pipe to an actual dot, and have spent a couple hours already using every combination of search terms I can think of to figure it out. Stata's help files have been no help either. The code I'm using is:
twoway (line asm_total_perc year, lcolor(navy) lwidth(thick) lpattern(dash)) ///
(line sen_total_perc year, lcolor(dkorange) lwidth(vthick) lpattern(dot) ///
ylab(0(5)20) ///
xlab(1975(10)2015, notick) ///
ytitle("Percentage") ///
xtitle("Year") ///
legend(on order( ///
1 "Group A" ///
2 "Group B" ) ///
rows(1) cols(3)) ///
)
Is there a way to make the dots actual circles? Except for changing the color, the code I'm using is taken from an old project that created the figures like this:
I assume, there's some additional setting, or a Stata plugin that I'm missing. Please help!
Upvotes: 1
Views: 3373
Reputation: 9470
You can try connected
, rather than line
:
tw (connected y x, sort ms(o) connect(none))
Upvotes: 2