[R] split a y-axis to show data on different scales

Gabor Grothendieck ggrothendieck at gmail.com
Sun Aug 20 15:58:13 CEST 2006


Look at oma= and mar= parameters to par for controlling the
space when using mfrow=.  e.g.

opar <- par(oma = c(6, 0, 5, 0), mar = c(0, 5.1, 0, 2.1), mfrow = c(2,2))
for(i in 1:4) plot(1:10)
par(opar)

On 8/20/06, Anupam Tyagi <AnupTyagi at yahoo.com> wrote:
> I think information can be enhanced by using different scaled graphs next to
> each other. mfrow() created too much space, there may be no need to again draw
> the x-axis. It can be very useful to have different scales of the same data
> presented next to each other, in addition to the main graph. So I think the data
> of the person who started this thread could be displayed using one graph will
> all the data, and then a superimposed graph (sharing same x-axis) on any part of
> the data to give an enhanced visual communication. Drawing grid lines with same
> tick marks in both graphs can enhance this visual communication. This is like
> "static zooming". Of course it is important to make sure that the change in
> scale is evident, because it is needed for the interpretation of the
> graph---using a grid with same tick marks can produce this effect visually.
>
> Anupam.
>
> ______________________________________________
> R-help at 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.
>



More information about the R-help mailing list