Skip to content
Back to formatted view

Raw Message

Message-ID: <20020820120650.JVHF27403.mta07.mail.mel.aone.net.au@there>
Date: 2002-08-20T12:02:22Z
From: Jim Lemon
Subject: plot and bg
In-Reply-To: <3D61E829.6000908@inrialpes.fr>

Olivier Martin wrote:

> Hi all,
>
> I would like to plot some points and define the bg color of my graphics.
> But the bg parameter set is defined for the. whole graphic.
> In fact, i would like to use something like :
>
> box(bg=gray(0.9)).
>
> So, the background  concerns only the plot region  and not the main 
> title, the x title and the y title.
>

This may not be the easiest way, but...

> plot(1:5,type="n")
> pd<-par("usr")
> rect(pd[1],pd[3],pd[2],pd[4],col="Gray")
> par(new=T)
> plot(1:5)

Jim
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._