On 01/27/2010 06:41 AM, narillosdesan...@gmail.com wrote:
No mate,
Sorry first of all about my indefinition (I´m Spanish, I´m improving
everyday but a long road to the perfection). Sorry pleae.
Second, also it is diffcoult sometimes to express what we try (sorry and
many thanks just for reading of course for helping).
Imagine you plot
X=[2 4 6 8] front a Y=[6 5 8 7]
When you plot it by default all is white what I want is to use
par(br="gray") to make the graph gray but I want that the area (the
imaginary square defined by the axis) not to be gray I want to deffine its
colour by ie lightblue.
So the image will be a square image outside gray and on the axis area (not
the dots, points or bar plots) the area in lightblue.
I don´t now if I have expressed well if not latter I will send an example,
ok?
Hi,
You can make the background of the plot area a different color:
# first set up the plot
plot(X,Y,type="n",...)
# get the coordinates of the edges of the plot
xylim<-par("usr")
# then display a rectangle that fills it
rect(xylim[1],xylim[3],xylim[2],xylim[4],
col="lightblue",border="black")
# then plot the points over the rectangle
points(X,Y,type="b")
Jim
______________________________________________
R-help@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.