(just tranlationg...)

Hi,

I am trying to put the legend on the outside of plot region. How can I do that?
My code looks like...

df<-read.table(stdin(),head=T,sep=",")
row,LENGTH,LAT
091639,10.002,42.26282
091640,30.808,42.26834
091641,21.591,42.31689
091642,22.030,41.53246
091643,22.744,42.01954
091644,12.702,42.67751
091645,39.728,42.06479
091647,63.057,41.25283
091648,19.523,41.01925
091649,13.336,42.46904
091650,8.935,42.80971
091651,25.275,42.50678
091652,9.983,42.89345
091653,9.416,41.15288
plot.new()
tplot<-plot(rownames(df), df[,1], type="n", axes=F, xlab="", ylab="" )
lines( rownames(df), df$LENGTH, lwd=1.0, col="blue", lty=1 )
points( rownames(df), df$LAT, lwd=1.0, col="red", pch=19 )
axis(1, rownames(df), labels=rownames(df), tick=T, las=2)
axis( 2, labels=T, tick=T, las=2)
title(ylab="Nivel (m s.n.m.)")
box( lwd=1.0, lty=1)
legend("top", doc$varNames(), ncol=2, pch=c("-", "."), col=c("blue", "red"), bty="n")

many thanks.



----- Mensagem original ----
De: Pilar Loren <pilar.loren@gmail.com>
Para: r-help@r-project.org
Enviadas: Sexta-feira, 18 de Janeiro de 2008 8:50:15
Assunto: [R] Leyenda

Hola estoy intentando colocar la leyenda de un gráfico fuera de la plot
region, es posible hacer esto? Como?

Mi código es el siguiente:
> df
      LENGTH      LAT
091639 10.002 42.26282
091640 30.808 42.26834
091641 21.591 42.31689
091642 22.030 41.53246
091643 22.744 42.01954
091644 12.702 42.67751
091645 39.728 42.06479
091647 63.057 41.25283
091648 19.523 41.01925
091649 13.336 42.46904
091650  8.935 42.80971
091651 25.275 42.50678
091652  9.983 42.89345
091653  9.416 41.15288
> plot.new()
> tplot<-plot(rownames(df), df[,1], type="n", axes=F, xlab="", ylab="" )
> lines( rownames(df), df$LENGTH, lwd=1.0, col="blue", lty=1 )
> points( rownames(df), df$LAT, lwd=1.0, col="red", pch=19 )
> axis(1, rownames(df), labels=rownames(df), tick=T, las=2)
>
> axis( 2, labels=T, tick=T, las=2)
> title(ylab="Nivel (m s.n.m.)")
>
> box( lwd=1.0, lty=1)
>
> legend("top", doc$varNames(), ncol=2, pch=c("-", "."), col=c("blue",
"red"), bty="n")


Muchas gracias

    [[alternative HTML version deleted]]




-----Anexo incorporado-----

______________________________________________
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.



 para armazenamento!

	[[alternative HTML version deleted]]

