[R] ggplot output

Abhijit Dasgupta
Thu, 04 Nov 2010 14:59:57 -0000

The other way (in the same spirit as par(mfrow = ...) in base graphics) is to
use the grid.arrange function in the gridExtra package. See it's
documentation for examples.


On Nov 4, 2010, at 9:36 AM, ashz wrote:

>
> Dear All,
>
> I have this script:
>
> dat <- data.frame(Month = hstat$Date,C_avg = hstat$C.avg,C_stdev >
hstat$C.stdev)
> ggplot(data = dat, aes(x = Month, y = C_avg, ymin = C_avg - C_stdev, ymax
> C_avg + C_stdev)) +
>  geom_point() +
>  geom_line() +
>  geom_errorbar()
>
> dat <- data.frame(Month = hstat$Date,K_avg = hstat$K.avg,K_stdev >
hstat$K.stdev)
> ggplot(data = dat, aes(x = Month, y = K_avg, ymin = K_avg - K_stdev, ymax
> K_avg + K_stdev)) +
>  geom_point() +
>  geom_line() +
>  geom_errorbar()
>
> dat <- data.frame(Month = hstat$Date,S_avg = hstat$S.avg,S_stdev >
hstat$S.stdev)
> ggplot(data = dat, aes(x = Month, y = S_avg, ymin = S_avg - S_stdev, ymax
> S_avg + S_stdev)) +
>  geom_point() +
>  geom_line() +
>  geom_errorbar()
>
> Running the script generates 3 separate graphs, how can I output them next
> to each other?
>
> Thanks
>
> --
> View this message in context:
http://r.789695.n4.nabble.com/ggplot-output-tp3027026p3027026.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide