Finally I´m very near on the graph I want...
The code is this (based on your guide):
First I read this data on the M.txt file:
Player TYr Dec Jose 20 14 Pepe 12 16 Andres 15 12 Guille 16 14 Pedro 18
19 Luis 14 19 Raul 18 15 Pepe 7 5
MC<-read.table("MC.txt",header=T,sep="",dec=",")
#I read the data
attach(MC)
par(bg="black")
plot(x = MC$TYr, y = MC$Dec, xlab="Actual Goals",
ylab="Last year Goals",col="white",col.axis="white")
title("Goals on Game",font=4,col="white")
lim<-par("usr")
rect(lim[1],lim[3],lim[2],lim[4],col="white",border="white")
text(x = MC$TYr, y = MC$Dec, labels = MC$Player)
grid()
abline(1,1)
WHAT IS MY PROBLEM?
The main title and the axis names doesn´t appear I want to put them on white
but the script doesn´t run. Can any one guide me?
The other problem is that the border of the x and y axis doesn´t appears...
Sorry about my silly questions...
2010/1/27 Jim Lemon <[email protected]>
> On 01/27/2010 06:41 AM, [email protected] 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
>
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.