[Rd] postscript failure manifests in plot.TukeyHSD
p.murrell at auckland.ac.nz
Tue Dec 21 23:16:26 CET 2010
On 17/12/2010 2:17 a.m., Ben Bolker wrote:
> On 10-12-16 12:09 AM, Jari Oksanen wrote:
>> On 16/12/10 04:24 AM, "Paul Murrell"<p.murrell at auckland.ac.nz> wrote:
>>> According to the PostScript Language Reference Manual and the PDF
>>> Reference, in both PDF and PostScript ...
>>> ... a line width of zero is valid, but not recommended (and is clearly
>>> not supported by some viewers).
>>> ... a line dash pattern cannot be specified as all zero lengths.
>>> (So, because R generates the line dash pattern proportional to the line
>>> width, a specification of lwd=0 and
>>> lty=anything-other-than-"solid"-or-"none" does not make sense.)
>>> I think three fixes are required:
>>> (i) Enforce a minimum line width of 0.01 (mainly because that is not
>>> zero, but also because that is the smallest value greater than zero when
>>> you round to 2dp like the PDF and PostScript devices do and it's still
>>> REALLY thin).
>>> (ii) If the line dash pattern ends up as all zeroes (to 2dp), because
>>> the line width is so small (thin), force the dash pattern to "solid"
>>> (iii) plot.TukeyHSD() should not use lwd=0 (0.5 is plenty difference to
>>> be obviously "lighter" than the main plot lines)
>>> I will commit these unless there are better suggestions or bitter
>> The difference between working previous (of R 2.11.1) and failing
>> current-still-yesterday (R 2.12.1 RC) was:
>> $ diff -U2 oldtukeyplot.ps /Volumes/TIKKU/tukeyplot.ps
>> --- oldtukeyplot.ps 2010-12-14 12:06:07.000000000 +0200
>> +++ /Volumes/TIKKU/tukeyplot.ps 2010-12-14 12:13:32.000000000 +0200
>> @@ -172,5 +172,5 @@
>> 0 setgray
>> 0.00 setlinewidth
>> -[ 3.00 5.00] 0 setdash
>> +[ 0.00 0.00] 0 setdash
>> 660.06 91.44 m
>> So 0.00 setlinewidth worked, but [0.00 0.00] 0 setdash failed. Assuming
>> PostScript is anything like English, it is the all-zero dash that caused the
Thanks Jari. Since the PDF and PostScript references recommend NOT
using 0 line width I think it is still worthwhile enforcing a lower limit.
>> Cheers, Jari Oksanen
> Yes; I think Paul's fix #2 does this, and fixes #1 and #3 are trying
> to avoid problems in the future ...
Thanks for your help with this Ben and for the documentation
suggestions. The fixes have now been committed to the development version.
> Ben Bolker
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
64 9 3737599 x85392
paul at stat.auckland.ac.nz
More information about the R-devel