[R] Specifying line types

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Sun Nov 17 23:36:18 CET 2002


Patrick Connolly <p.connolly at hortresearch.co.nz> writes:

> I wish to make a vector of line types something like c("21", "32")
> which is simple enough to do.  But if I want to have a continuous line
> part of that vector, I'd have thought "40" would produce a blank space
> of zero length thereby achieving the desired effect.  Not so.
> 
> Even less predictable is if I try "A0".  The result seems to be
> similar to specifying "A8" (approximately).  Is that by design?

The source is available...

It says that (assuming we're talking about the x11 device) "0" is
solid and any other 0-nybbles (= half-bytes, hex digits) are converted
to "1" to prevent X11 from falling over.
 
> It's no surprise that lty = 1 cannot mix with lty = "32" but in the
> end, I discovered that c("21", "32", "solid") will do what I want,
> though it wasn't obvious.
> 
> Is something lacking in the documentation or just in my comprehension?

Well, what you ended up doing is completely documented in help(par).

The page might be clearer that 0-nybbles are undesirable, and if
any behaviour is driver-specific, the help page for the device should
probably say something about it.

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