Skip to content

rotate plot

2 messages · Ron Ophir, Martin Maechler

#
Dear group members,
I am trying to plot two adjacent plots using layout function. One plot is scatter plot and the other is density plot. However, I would like that the density plot would be present horizonaly in respect to the scatter plot.
|                                        |
|                                        |
|                                        |
|                                        |
*
|                *                      |  *
|        *       *      *             |    * *
|    *        *                        |         *
|                                        |     * *
|------------------------------   |*-------------------------------

How do I rotate 90 dgrees the entire density plot?
Thanks in advance,
Ron
#
Ron> Dear group members,
    Ron> I am trying to plot two adjacent plots using layout function. One plot is scatter plot and the other is density plot. However, I would like that the density plot would be present horizonaly in respect to the scatter plot.
    Ron> |                                        |
    Ron> |                                        |
    Ron> |                                        |
    Ron> |                                        |
    Ron> *
    Ron> |                *                      |  *
    Ron> |        *       *      *             |    * *
    Ron> |    *        *                        |         *
    Ron> |                                        |     * *
    Ron> |------------------------------   |*-------------------------------

    Ron> How do I rotate 90 dgrees the entire density plot?

Things like these are quite easily done using the 
recommended  "grid" package,  i.e.  library(grid).
using its much more powerful viewports instead of the layout()
function.

library(help = grid)  
## something you do with every non-standard package you start using !?

points you to
       http://www.stat.auckland.ac.nz/~paul/grid/grid.html
which contains a lot of nice documentation. 

Using "grid" graphics (instead of traditional "base" graphics)
is believed to be the real future of (static) graphics in R
   {take this with a grain of salt.  It's a hope mainly}

Martin Maechler <maechler at stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO C16	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><