I would like to add a zigzag or squiggle at my y-axis in my graph, but I don't know how to do this.
I am graphing treatment adherence (in %) over time (in months). Currently my y-axis goes from 0 to 100%, but I would like to adjust it in order to improve the visibility of small differences.
Hopefully it is possible to start my y-axis at 0%, then get a zigzag up to 60% (for example), and then continue until 100%, preferably with steps of 5%. Underneath I the code I currently use, I think the solution is somewhere in the ylabel part, but I'm not sure. I already made a graph where I replaced the ylabel(0(10)100) into ylabel(0 60(5)100), but then the distance between 0 and 60 remains big, while I would like to shorten it.
Thanks in advance, Liza\ I use version 15
Code:
twoway (line percentage_ month, lcolor (black)), /// ylabel (0(10)100) xlabel (1(1)6) /// title("Ethiopia: TB treatment adherence over time", margin (medlarge)) /// ytitle("treatment adherence (%)", margin (medlarge) size(medsmall)) xtitle("time (month)", size(medsmall)) /// note("DAT used: 99DOTS, population: DS-TB patients", size(vsmall))
0 Response to Zigzag or Squiggle in twoway line graph
Post a Comment