[Rd] postscript failure manifests in plot.TukeyHSD
Ben Bolker
bbolker at gmail.com
Thu Dec 16 14:17:26 CET 2010
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:
>
>> Hi
>>
>> 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"
>> instead.
>>
>> (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
>> objections.
>>
> Paul,
>
> 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
> np
> 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
> failure.
>
> 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 ...
cheers
Ben Bolker
More information about the R-devel
mailing list