From bpeyser at jhmi.edu  Tue May 30 23:03:50 2006
From: bpeyser at jhmi.edu (bpeyser at jhmi.edu)
Date: Tue, 30 May 2006 23:03:50 +0200 (CEST)
Subject: [Rd] Documentation error for par(lty) (PR#8914)
Message-ID: <20060530210350.A9BA929D36@slim.kubism.ku.dk>

Full_Name: Brian D. Peyser
Version: 2.1 (also 2.3)
OS: Windows XP Pro
Submission from: (NULL) (162.129.236.18)


In the documentation for par() (both on-line and manual) there is an error
regarding line type specification (lty). It actually omits a feature. The
documentation states that a string up to 8 NON-ZERO hexadecimal digits may be
used to specify on/off lengths, i.e. "44" = "dashed".

However, lty DOES accept zero:

plot(NA, NA, xlim=c(-2,2), ylim=c(-2,2))
abline(h=1, lwd=2, col="black", lty="0880")
abline(h=1, lwd=2, col="gray", lty="88")

This will produce a plot with a horizontal line that is alternately gray and
black. The first number is length "on", then length "off", so that the black
line starts with zero length on, then 8 off, then 8 on, then zero off, such that
the zeroes effectively swap the "on" and "off" positions. The gray line starts
"on" for 8 units then "off" for 8.

-Brian Peyser



[Rd] Documentation error for par(lty) (PR#8914)
bpeyser at jhmi.edu