[R-SIG-Mac] dash spacing and slope in quartz device

Simon Urbanek simon.urbanek at r-project.org
Thu Jun 5 23:11:38 CEST 2008


Ken,

it turned out that the speed optimization fix was the reason for this  
new behavior (and strangely enough only on Leopard). I have replaced  
it with another variant that should keep the dashes (mostly) intact in  
the current R-patched and R-devel (binaries will be available  
tonight). For contiguous lines with hundreds of points there may be  
gaps due to re-starting dashes at break points (for speed up), but we  
can't do much about it now simply because the drawing slows down to a  
crawl otherwise.

Cheers,
Simon


On May 29, 2008, at 9:17 AM, Kenneth Knoblauch wrote:

> Hi,
>
> There was some discussion about slowdowns in the new quartz
> device a few weeks ago that had to do with line drawing but
> I don't think that the following has been mentioned.
>
> I've noticed a "new" behavior in the quartz device that can be seen
> by running
>
> xx <- seq(1:100)
> plot(xx, xx^2, type = "l", lty = 2)
>
> On my display, the dash spacing disappears for xx < 40
> for the default window size.
> In addition, the dashes are obliterated by increasing the
> line width,
>
> lines(xx, 0.5 * xx^2, lty = 2, lwd = 2)
>
> unless I enlarge the window.  The same occurs for lty = 3.
>
> The dash spacing seems to depend on the slope of the contour.
>
> plot(rep(1, 100), lty = 2, type = "l", ylim = c(0, 100))
> lines(xx, lty = 2)
> lines(2 * xx, lty = 2)
>
> This did not occur in an earlier version of R that I tried (R 2.2.0)
> and does not occur in other graphic devices that I have tried
> (x11 and pdf, so far).
>
> sessionInfo()
> R version 2.7.0 Patched (2008-05-28 r45808)
> i386-apple-darwin8.10.1
>
> locale:
> en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> Does anyone else see this?  Apologies in advance if this is normal
> behavior.  Thank you.
>
> best,
>
> Ken
>
>
> -- 
> Ken Knoblauch
> Inserm U846
> Institut Cellule Souche et Cerveau
> Département Neurosciences Intégratives
> 18 avenue du Doyen Lépine
> 69500 Bron
> France
> tel: +33 (0)4 72 91 34 77
> fax: +33 (0)4 72 91 34 61
> portable: +33 (0)6 84 10 64 10
> http://www.sbri.fr
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac



More information about the R-SIG-Mac mailing list