# Histograms: display a y-axis with a break in the range of values

I am plotting a histogram showing me the repartition of values of the variable dist_enrolled on a population. This variable takes very small values for 98% of students and can be very high for the remaining ones. I am interested in both the proportion of these "outliers" in the total population, and the distribution of dist_enrolled for them.

My first thought is to put a break in the y-axis (say from 10 to 90), displaying only values from 0 to 10 and then from 10 to 90. That could allow me to see better the outliers while still displaying the 98% value of the first bin. However, I do not manage to put that into practice.

You can find below the histogram as it looks now.

Discussion of scale breaks in Stata is an easy search in Stata or Google away at say this FAQ. You are, or should be, expected to try such searches yourself.

The executive summary is that Stata is unwilling to support scale breaks directly.

Scale breaks were common when graphs were drawn by hand (those of a certain age still remember that phase well), but are much less often supported by software, for a mix of reasons. One good reason is that it is much easier with software to use nonlinear scales on either or both axes of a plot.

Now that the question has been migrated to CV, the bigger deal is what to do statistically with such a distribution. A little experimentation shows that such distributions are not pathological. Lognormal distributions with moderate spread could easily produce broadly similar histograms.

You have many possible alternatives, including

1. Transformation of your variable, which isn't explained, but may well be a distance that must be positive.

2. Kernel density estimation for your variable, or preferably a transformation of it. The estimated density will be positive over interesting ranges and can itself be shown on logarithmic scale.

3. In Stata you can use a spikeplot using square root scale. It's easy to make such plots look like histograms.