[R] plot background - excel gradient style background ?
Greg Snow
538280 at gmail.com
Sat Jun 30 19:57:10 CEST 2012
Here are examples of a histogram and a boxplot using rasterImage to
make the background:
bg <- matrix( c('#ddddff','#7777ff','#ddddff'), ncol=1 )
tmp <- hist(iris$Sepal.Width)
xylim <- par('usr')
rasterImage(bg, xylim[1], xylim[3], xylim[2], xylim[4])
plot(tmp, add=TRUE, lwd=3)
plot( Petal.Length ~ Species, data=iris )
xylim <- par('usr')
rasterImage(bg, xylim[1], xylim[3], xylim[2], xylim[4])
plot( Petal.Length ~ Species, data=iris, add=TRUE )
On Fri, Jun 29, 2012 at 3:07 PM, jcrosbie <james at crosb.ie> wrote:
> I have a number of different figures I wish to create with a gradient
> background. In addition to the two examples I've uploaded I need a boxplot,
> histogram, etc.
>
>
> http://r.789695.n4.nabble.com/file/n4634932/fig1.png fig1.png
> http://r.789695.n4.nabble.com/file/n4634932/fig2.png fig2.png
>
> --
> View this message in context: http://r.789695.n4.nabble.com/plot-background-excel-gradient-style-background-tp4632138p4634932.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 http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
--
Gregory (Greg) L. Snow Ph.D.
538280 at gmail.com
More information about the R-help
mailing list