Dear R-users,

would you know a nice way to use the command "lend" in the legend?

The following code gives you a really simple example and a inefficient
workaround.

Thanks in advance for any suggestion.

Best,
Giancarlo

plot(c(1,1), lwd=15, lend=2, t="l")
lines(c(0.8, 0.8), lwd=15, lend=1, col=2, lty=3)
legend("topright", legend=c("bla", "bla1"), col=1:2, lty=c(1,3), lwd=15,
cex=3)

plot(c(1,1), lwd=15, lend=2, t="l")
lines(c(0.8, 0.8), lwd=15, lend=1, col=2, lty=3)
lege <- legend("topright", legend=c("bla", "bla1"), col=1:2,
pch=c(15,15), lty=0, cex=3, pt.cex=2.5, bty="n")
points(lege$rect$left,lege$text$y[1], pch=15, cex=2.5, col=1)
points(lege$rect$left+0.03,lege$text$y[1], pch=15, cex=2.5, col=1)
points(lege$rect$left+0.05,lege$text$y[1], pch=15, cex=2.5, col=1)
points(lege$rect$left,lege$text$y[2], pch=15, cex=2.5, col=2)



===========================================
Camarda Carlo Giovanni
PhD-Student
Max Planck Institute for Demographic Research
Konrad-Zuse-Strasse 1
18057 Rostock, Germany
Tel:  +49 (0)381 2081 172
Fax: +49 (0)381 2081 472
[EMAIL PROTECTED]
===========================================


----------
This mail has been sent through the MPI for Demographic Rese...{{dropped}}

______________________________________________
R-help@stat.math.ethz.ch 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.

Reply via email to