Announcement

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

  • Controlling variable labels with two over statements, stacked bar chart

    I'm trying to manufacture a stacked bar chart with use of two over statements. Everything is working fine with the exception of labels defined in the second over statement (bold). Grouping manufactured with use of the group two command does not appear to reflect settings passed via the label option.

    Code:
    * Stacked bar chart with percentages.
    graph bar varlist, ///
        over(group_one, label(labsize(vsmall) angle(vertical)) sort(sortvar) descending) ///
        over(group_two, label(labsize(vsmall) angle(vertical)) sort(sortvar) descending) ///
        nofill asyvars  ///
        ytitle("%", size(small) margin(vsmall)) ///
        ylabel(, labsize(vsmall) angle(horizontal)) ///
        plotregion(lstyle(none)) ///
        lines(lwidth(vthin)) ///
        title("Graph", size(medsmall)) ///
        caption("{it: Data source: Data}", ///
        size(vsmall)) ///
        legend( size(vsmall) ring(1) position(6) region(lwidth(vvthin) lcolor(black))) ///
            stack percent ///
        name(somename, replace)
    Kind regards,
    Konrad
    Version: Stata/IC 13.1
Working...
X