Skip to content

lty

5 messages · Bill Simpson, Peter Dalgaard

#
Sorry, my previous message said using lty="2" made line disappear.  Wrong.

What happens is that
"2" is dots
"3" is dashes

BUT docs say
"2" is dashes
"3" is dots

So there is an error in the docs.

Bill

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Bill Simpson <wsimpson@uwinnipeg.ca> writes:
Nope:
	lty=1 solid
	lty=2 dashed
	lty=3 dotted
	lty=4 dotdashed
	lty="1" pattern: 1 "dot" on, 1 "dot" off
	lty="2" pattern: 2 "dots" on, 2 "dots" off
	lty="3" pattern: 3 "dots" on, 3 "dots" off
	lty="32" pattern: 3 "dots" on, 2 "dots" off
	lty="124" pattern: 1 on, 2 off, 4 on, 1 off, 2 on, 4 off, 
	...and so forth...

You can see this clearly if you start with par(lwd=5). As far as I can
see without actually digging into the source,

2 == "4"
3 == "13"
4 == "3134"

So the docs are OK, but perhaps we need to distinguish more clearly
between integer and character lty's.

The dot-dash pattern on X11 looks wrong, though. I think it should
have been "1343", i.e. same pattern, reverse colors.
#
Peter, to me (and this is English language) "dot" is shorter than "dash"!
.-.--
dot dash dot dash dash.

So "dot" SHOULD be label for lty="2" pattern: 2 "dots" on, 2 "dots" off
And "dash" SHOULD be label for lty="3" pattern: 3 "dots" on, 3 "dots" off.
Since dot is shorter than dash.
This is answer to previous posting on lwd.  So it is there, just not
documented. Thanks.
My comments above were based on viewing saved plot with ghostview and
actually printing it with ghostscript.

Bill

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Bill Simpson <wsimpson@uwinnipeg.ca> writes:
Sure
Look again: 2 is a number, selecting one of 4 preset patterns, "2" is
a character, specifying the pattern directly.

Try
 plot(1:10,type='l',lty=2,lwd=4)
 plot(1:10,type='l',lty=3,lwd=4)
 plot(1:10,type='l',lty='2',lwd=4)
 plot(1:10,type='l',lty='3',lwd=4)
In the snapshots, it is there... Don't know if it works on postscript
yet, though.
#
OK now I get it.  Sorry for cluttering the list with nonsense.

BTW lwd works in R Graphics window but not when printed. (in my version of
snapshot)

Bill

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._