[R] Different axis limits for each facet in ggplot2

hadley wickham h.wickham at gmail.com
Mon Jul 16 21:30:38 CEST 2007


On 7/16/07, Karl Ove Hufthammer <Karl.Hufthammer at math.uib.no> wrote:
> Hi!
>
> Is it possible to have different axis limit for each facet in a ggplot2
> plot? Here is an example:

Not yet, although it is on the to do list.

> --------------------------------------------------------------
> library(ggplot2)
>
> x=seq(-10,10,.1)
> y=cos(x)
> z=sin(x)*10

One crude way to get around it is:

df <- data.frame(x,y,z)
df <- rescaler(df)

 - ie. scale all variables to common scales

Hadley



More information about the R-help mailing list