Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Grid lines and y axis labels not aligned in a twoway bar graph (made using -coefplot-)

    After some lengthy computations, I have made my results into bar graphs using Ben Jann's -coefplot-, which is based on -graph twoway-. Briefly, I used -lincom- following -margins-, stored each of my lincom estimates, and then plotted them using -coefplot. Now, the graphs look fine except that the bars themselves are not aligned with their labels (on the y axis), and also with the horizontal grid lines. There is a way to fix this at the time of making the graphs, by specifying the -nooffset- global option in coefplot. This would require me, however, to repeat my entire estimation session (which would take a few days!).

    My question: Is there a way to post-edit the graphs after they have been made, using for example the Graph Editor interface, or any other way, to align the bars with their labels and with the grid lines?

    Below is an example of my code, and I could share an actual graph in a private communication.

    Thank you very much for any advice!
    Mustafa

    coefplot (blkwhtxpost_rarbase, rename((1)=Overall)) ///
    (blkwhtxpost_female1, rename((1)=Male)) (blkwhtxpost_female2, rename((1)=Female)) ///
    (blkwhtxpost_mcdever2, rename((1)=Dual)) (blkwhtxpost_mcdever1, rename((1)=NonDual)), ///
    recast(bar) barwidth(0.5) fcolor(*.5) lcolor(black) lwidth(thin) ///
    ciopts(recast(rcap) lcolor(black) lwidth(medthin)) citop xline(0, lcolor(black)) ///
    xtitle("Adherence", size(medsmall)) xlabel(#5, labs(medsmall)) format(%9.2f) coeflabel(, labs(medsmall))
Working...
X