Re: [R] How to rotate any plot in R

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Sat 09 Sep 2006 - 19:05:54 GMT

With lattice or any grid graphics-based plot we can draw it in a rotated viewport:

library(lattice)
library(grid)
grid.newpage()
pushViewport(viewport(angle = 90, name = "VP")) upViewport()
x <- 1:10
print(xyplot(x ~ x, groups = gl(2, 5), auto.key = TRUE), draw.in = "VP")

or

grid.newpage()
pushViewport(viewport(angle = 90))
x <- 1:10
print(xyplot(x ~ x, groups = gl(2, 5), auto.key = TRUE), newpage = FALSE) upViewport()

On 9/9/06, stat stat <stat700004@yahoo.co.in> wrote:
> Dear all R users,
>
> I am wondering whether it is possible in R to rotate any plot like Histogram, scatter plot, correlogram etc along with their legend, comments etc.
>
> Thanks and regrads,
> stat
>
>
> ---------------------------------
> Find out what India is talking about on - Yahoo! Answers India
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>



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. Received on Sun Sep 10 05:10:22 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 09 Sep 2006 - 20:17:23 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.