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

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Wed Jun 5 19:02:56 CEST 2002

Marcus Eger <eger.m at gmx.de> writes:

> On Wednesday 05 June 2002 16:11, Peter Dalgaard BSA wrote:
> > Marcus Eger <eger.m at gmx.de> writes:
> > > 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.
> >
> > Eh?
> With "string" mode, I mean that a line type may be specified by a sequence of 
> characters. E.g., as R-help says (par.html),
> >>lty="3313" specifies three units on followed by three off followed by one 
> on and finally three off. <<
> Another example is lty="11" which produces a narrow dot pattern. I wished 
> that it were possible to also define a solid line by these patterns.

Yes, but "solid" is a perfectly valid string and can easily be mixed
with the others. The problem with the patterns is that they recycle and
thus give alternating on/off values by definition. 

Curiously, "0" gives a solid line in plot() but not in legend(),
whereas "00" works in both places.

   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
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