Announcement

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

  • Suppress repeated cat axis when using -graph bar, by()-

    What is the easiest general way to suppress a repeated category axis when using graph bar, by()?

    I am using version 14.2. The following example illustrates:

    sysuse lifeexp, clear
    keep if lexp>70 & lexp<79 & region==1
    rename lexp byvar
    rename country catvar
    graph hbar, over(catvar) by(byvar)

    By default, the category axis (unlike the y-axis) is repeated across subplots. There is no by(byvar, noicataxes) option, while over(catvar, label(nolabels)) removes the labels from all plots.

    Last edited by Toby Robertson; 20 May 2019, 11:33.

  • #2

    Code:
    graph hbar, over(catvar) over(byvar) nofill  
    is more civilised for your example. I can't easily guess how much better that would be for your real data.

    I feel an urge to recommend scrutiny of https://www.statalist.org/forums/for...updated-on-ssc

    Comment

    Working...
    X