Dear,
I can't plot legend over a Rasterlayer.
My system is MAC OS Lion.
See my problem:
### Data
> img
class : RasterLayer
dimensions : 5, 5, 25 (nrow, ncol, ncell)
resolution : 0.002245, 0.002245 (x, y)
extent : -48.33875, -48.32753, -20.35756, -20.34634 (xmin, xmax,
y
Thank you Sarah and Petit bleu for your help.
I solved my problem with the code of Sarah.
Komine
--
View this message in context:
http://r.789695.n4.nabble.com/Problem-with-legend-tp3826973p3827461.html
Sent from the R help mailing list archive at Nabble.com.
_
You're passing a vector of length 3 to the legend argument of legend(), so R is
assuming that you have three things you want to display.
There are two alternatives:
1. Provide legend() a legend that's a single character vector.
2. Specify that you don't want symbols for the last two of the three l
Maybe by adding
col=c("grey","white","white"), bg="white
but not sure ...
Have a nice end of day,
Ptit Bleu.
--
View this message in context:
http://r.789695.n4.nabble.com/Problem-with-legend-tp3826973p3827120.html
Sent from the R help mailing list archive at Nabble.com.
___
HI,
This code is part of a code I used to do a linear regression:
>points(var1~var2,data=Regress,pch=21,bg="grey")
>reg11<-lm(var1~var2,data=Regress)
>abline(lm(var1~var2,data=Regress),lty=2,lwd=2,col="grey")
>legend("topleft",legend=
>c("NDII from composite",
>"y= 0.0007x - 0.1156",expression(p
valeria pedrina wrote:
hi all,
I want to do a plot and put the legend on the left of y axis this is my
code:
x<-seq(1980,2005,1)
plot(x,tfa_ita,type="l",col=1,xlim=c(1979,2005),ylim=c(0.2,1.7),xlab="",ylab="",main="Totale
Attivita` Finanziarie")
lines(x,tfa_spa,type="l",col=2)
lines(x,tfa_aus,t
hi all,
I want to do a plot and put the legend on the left of y axis this is my
code:
x<-seq(1980,2005,1)
plot(x,tfa_ita,type="l",col=1,xlim=c(1979,2005),ylim=c(0.2,1.7),xlab="",ylab="",main="Totale
Attivita` Finanziarie")
lines(x,tfa_spa,type="l",col=2)
lines(x,tfa_aus,type="l",col=3)
lines(x,tf
7 matches
Mail list logo