Announcement

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

  • graph bar over() over() by() hide all xaxis labels but one

    How can I remove the x-axis labels for age group and health authority under the ‘Low risk’ part of the graph? (and keep these labels under the ‘Higher risk’ part of the graph)

    (Age group labels for low risk are under plotregion1/grpaxis[1])
    (Health region labels for low risk are under plotregion1/supaxis[1])

    graph bar (mean) vacc_100 [pw=wts_m] if bc==1 ///
    , ///
    over(age_cov, label(labsize(tiny) angle(45))) ///
    over(ha, relabel(3 "Van Coastal" 4 "Island") label(labsize(small))) ///
    by(highrisk, col(1) ///
    note("Source: CCHS 2011-2012 PUMF") ///
    noedgelabel) ///
    ytitle(Vaccinated (%), size(medsmall)) ///
    ylabel(20(20)100, angle(horizontal) labsize(medsmall)) ///
    yscale( range(0 1)) ///
    blabel(bar, position(inside) format(%9.0f) color(white) size(tiny)) ///
    graphregion(lcolor(black) fcolor(white)) ///
    plotregion(fcolor(white)) ///
    name(vacc_age_risk_ha_BC, replace) ///
    saving("$cchs_2011_12_output\Vacc v age risk HA BC.gph", replace)

    Thanks!

    David Puddicombe
    BC Centre for Disease Control
    Attached Files

  • #2
    You can edit the individual graphs in the graph editor or record what graph editor does and use gr_edit


    Code:
    graph bar wage, over(occ, sort(1) label(labsize(small) angle(45)) ) over(smsa, label(labsize(medium))) by(union, col(1))
    gr_edit .plotregion1.grpaxis[1].draw_view.setstyle, style(no)
    gr_edit .plotregion1.supaxis[1].draw_view.setstyle, style(no)
    Click image for larger version

Name:	Graph.png
Views:	1
Size:	46.9 KB
ID:	1314918

    Comment

    Working...
    X