[R] Legend Help
PIKAL Petr
petr.pikal at precheza.cz
Tue Sep 3 11:45:22 CEST 2013
Hi
put line
legend("topright", legend=names(a)[3:9], lty=1, col=3:9)
before dev.off()
see ?legend for fine tuning.
Regards
Petr
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Ma Teresa Martinez Soriano
> Sent: Tuesday, September 03, 2013 10:59 AM
> To: r-help at r-project.org
> Subject: [R] Legend Help
>
> Hi to everyone and thanks for this service.
>
> I have a doubt with legend, I have seen ?legend, but I don't get the
> way to write in my code the
>
> legend that I want,
>
> This is my code:
>
>
>
> for( i in 1:4)}
>
> pdf(paste("plotImputed", i,".pdf",sep=""))
> plot(a[,6], type="l", main=paste( "Imputed Data GRUPO",i) )
> for(k in 3:9)(lines(a[, k], type="l", col=k))
> dev.off()
>
> }
>
>
> Each line represent a column of my data set, they are called: IE.2004,
> IE.2006, IE.2007....IE.2010 and this is (IE.2005, IE.2006...)
>
> what I would like to see in the graph
>
> Thanks a lot
>
> Best regards, Teresa
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
More information about the R-help
mailing list