0

I've been working on putting together a broken y-axis histogram, in order to display one very tall bar while not having the other bars invisible. In particular, I would like to be able to control not only what the tics are on the x-axis (they need to show the count bins from the histogram, not just the axes), but also how many tics there are on the x-axis.

This question got me started, though I had to figure out on my own how to use the xtics option in plotrix's gap.barplot to show the histogram bins: Put a break in the Y-Axis of a histogram

However, I still cannot figure out a way to plot a broken y-axis histogram without having it try to plot a tic for every single bin. Does anybody know a way to do this?

Community
  • 1
  • 1
user1521655
  • 486
  • 3
  • 17
  • 1
    Not an answer to your question, but a possible solution to the problem: would it be possible to just log transform your variables and plot the histogram of the log transformation? this is what i would usually do in your situation. You can apply this transformations directly in `ggplot2` by adding `scale_x_log10()` or `scale_y_log10()` to your graph object. for more information see here: http://docs.ggplot2.org/current/geom_histogram.html – bjoseph Aug 06 '14 at 14:38
  • A histogram is used to show the distribution of values. A broken axis distorts this. – Roland Aug 06 '14 at 15:17
  • You need to show code and a sample dataset. Then we could see what problem you are having with the "x-axis" which is usually managed with a 'breaks' argument. – IRTFM Aug 06 '14 at 15:23
  • If you're determined to break the axis, you should also [break the bar](http://peltiertech.com/images/2011-11/Ybroken.png). – Glen_b Aug 06 '14 at 22:30

0 Answers0