Marc A. Rohling wrote:
> Hello,
> 
> I try to handle a simple bar-plot, but it turns out to be not as simple
> as I thought.
...
> As you can see, because of the 4th bar (value > 45), the other bars look
> a little bit tiny: there is too much white-space. What I need to handle
> this problem is a function to insert a gap.
> 
> I tried to use gap.barplot, but unfortunately, it cannot handle any of
> the parameters I need from the barplot2-function.
> 
> After days of missing effort, I am sick of this problem. Is there a
> solution?

Hi Marc1,
As Marc2 said, the use of discontinuous axes in plots is a contentious 
one. No, I did not try to make gap.barplot compatible with barplot2 as 
the two seem to have different aims. gap.barplot is one solution to the 
troublesome issue of the outlier. What I would suggest as a one-off 
solution (to the horror of some) is to subtract, say, 25 from the 
outlier value, do the barplot, then:

par(xpd=TRUE)
axis.break(2,21,style="gap")
text(barpos[4],24,48.6)

I realize that your plot is more complex (I don't have gplots, etc. 
installed so I can't reproduce it at the moment), but that might give 
you something with which to work.

Jim

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to