patrick95350
patrick95350

Reputation: 125

Changing the Look of Dotted Line in Stata

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))  ///
    )

It produces the following: enter image description here

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: enter image description here

I assume, there's some additional setting, or a Stata plugin that I'm missing. Please help!

Upvotes: 1

Views: 3373

Answers (1)

dimitriy
dimitriy

Reputation: 9470

You can try connected, rather than line:

tw (connected y x, sort ms(o) connect(none))

Upvotes: 2

Related Questions