histogram with break on y-axis

14 views
Skip to first unread message

Bianca

unread,
Sep 10, 2008, 6:40:38 PM9/10/08
to Forest-R
Hi!

I am trying to plot a histogram with a break on the y-axis. I know it
is not good practice to do so, but one of my bins has so many counts
that most of the smaller ones are not picked up. I tried to find
something in the old R-help posts. One post suggested to use the
plotrix package. I can use the axis.break() function to draw a zigzag
on the y-axis but it does not allow me to actually create a gap of
values. The gap.barplot function does not quite do what I want either
although I can create a gap of values with it. I tried to change the
source code but did not get it to work the way I wanted.

Has any of you created a histogram with a break on the y-axis before?
Or do you have any suggestions where I could find code for that?

Thanks!

Bianca

John Kershaw

unread,
Sep 10, 2008, 7:22:23 PM9/10/08
to for...@googlegroups.com
ianca,

You might try using a log scale for the y-axis instead of the break.

JAK

greg.j...@weyerhaeuser.com

unread,
Sep 12, 2008, 12:30:40 PM9/12/08
to Forest-R
I would be inclined to keep the integrity of the histogram intact and
plot a second one (perhaps side by side) with just those bins that are
obscured by the scale of the first graph.

It does beg the question of whether those bins are important in the
context of a bin or bins with such large frequencies.

Greg
Reply all
Reply to author
Forward
0 new messages