[R] diagonally fill a rectangle with color gradient
p.murrell at auckland.ac.nz
Tue Apr 8 21:53:16 CEST 2008
tom soyer wrote:
> Is it possible to diagonally fill a rectangle with a color gradient? I
> noticed that the gradient.rect of plotrix could fill a rect either up and
> down or from side to side. I am looking for something similar but fills
> diagonally instead, e.g., from the upper left corner to the bottom right.
> Does anyone know how to do it in R?
Do you mean something like this ... ?
pushViewport(viewport(width=.5, height=.5, clip="on"))
pushViewport(viewport(width=2, height=2, angle=45))
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
64 9 3737599 x85392
paul at stat.auckland.ac.nz
More information about the R-help