[R] mixing different modes of lty line type specification in legend() ?

Marcus Eger eger.m at gmx.de
Wed Jun 5 15:47:49 CEST 2002

On Wednesday 05 June 2002 12:42, Ko-Kang Kevin Wang wrote:
> I am assuming you want to fit the three lines with line type 1, 42, and 11?
> If this is so you need something like:
>   legend(x,y,c("A","B","C"), lty=c(1,42,11))

The problem is: lty=42 is not the same as lty="42", e.g.,

I would like to use the "string"-mode for lty because thereby I can precisely 
define the stretch pattern.

On Wednesday 05 June 2002 13:15, Uwe Ligges wrote:
> What about
>   legend(x, y, c("A","B","C"), lty=c("dashed", "solid", "dotted"))

Yes, that is possible, but again, the pattern cannot be specified precisely. 
As an alternative, one could use:

legend(x, y, c("A","B","C"), lty=c("11", "22", "42"),lwd=3)

But, unfortunately, solid lines do not seem to supported in "string" mode.

+-------- ><> -------------------------------------------
| E-Mail: eger.m at gmx.de (NEW)
|         marcus.eger at physik.uni-marburg.de (OLD)
| WWW:    http://neuro.physik.uni-marburg.de/~eger (NEW)
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list