Announcement

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

  • Truncate X-axis on Histogram

    Hello!

    I am trying to truncate the x-axis on a histogram. The tail is very large and I would like to graphically display the tail to 1500 instead of 15000. I am trying to use the xlabel and xscale commands but I am not able to truncate the axis. I do not want to use the command 'if variable < 1500 because it will disrupt the percentages. Why is there only the tmax() function in sts graphs?

    My code is:
    histogram x4, normal percent xlabel(0(500)1500) xscale(range(0 1500) noextend) ylabel(,nogrid)

    Does anyone have any ideas?!?!!?!?!!?

    Thanks!

  • #2
    Recently discussed: http://www.statalist.org/forums/foru...in-a-histogram

    The wrinkle you add is wanting to keep the percents. I think you need to use twoway__histogram_gen to generate what you want to plot and then replot it using twoway bar. See http://www.stata-journal.com/sjpdf.html?articlenum=gr0014 for some discussion of that command.

    I can't support this as especially good practice. Perhaps a transformed scale would help. Also, if your data are right-skewed with outliers, a normal distribution is an implausible reference, although that may be what you want to underline.

    Please read the FAQ Advice again to note our strong preference for full real names, such as Angela Merkel.

    Comment

    Working...
    X