[R] pch="." plots much faster

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue May 13 18:07:57 CEST 2008


On Tue, 13 May 2008, Karl Ove Hufthammer wrote:

> Prof Brian Ripley:
>
>>> matrices, especially given that X11 redraws the plot whenever its window
>>> is covered/uncovered by another window, or when I switch virtual
>>> desktops.
>>
>> That is a function of your X setup.  R does ask for backing store to be
>> used, and so it seeems your setup is not doing so.
>
> I believe this is a common problem. I have observed it on all systems and R
> versions I've used.

Well, I've observed it with some window mangers in F8, but I've also seen 
other systems where a backing store was used.

> On my Fedora 8 system with R 2.7.0 Patched, the following causes complete
> repainting every time you I slightly move a window in front of the graphics
> window:
>
> X11(type="Xlib"); n=10^5; plot(rnorm(n),rnorm(n))
>
> Using cairo, the backing pixmap is used (but cairo is extremely slow in
> plotting 10^5 points, so that doesn't help much :-/ ).

It does if you use a more suitable plot of 10^5 points.

>
> -- 
> Karl Ove Hufthammer
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


More information about the R-help mailing list