Re: [Rd] X11 image problem in R-2.8.0 Under development / R-2.7

From: Martin Maechler <>
Date: Sat, 05 Apr 2008 22:31:28 +0200

>>>>> "BDR" == Prof Brian Ripley <> >>>>> on Sat, 5 Apr 2008 19:31:43 +0100 (BST) writes:

    BDR> Martin M x 2,
    BDR> Yes, no news in either of your most recent messages.  That's a really ugly 
    BDR> plot, though, and I do want to protest about either of these being worth 
    BDR> doing fast.

    BDR> On my home system

>> F <- ecdf(rnorm(10000))
>> system.time(plot(F))
    BDR> user system elapsed
    BDR> 1.343 0.035 1.410
>> x11(type="Xlib")
>> system.time(plot(F))
    BDR> user system elapsed
    BDR> 0.022 0.002 0.083     BDR> and if something is worth plotting, it is surely worth waiting 1.4s for?     BDR> (About 1/4 the time is spent on antialiasing.)

    BDR> Martin Morgan's example is atypical (how often do people do scatterplots 
    BDR> of 10,000 points?  Or ecdfs, come to that?), 
    BDR> but I see

>> X11(type="Xlib")
>> system.time(doplots(df)) # gcFirst=TRUE is the default
    BDR> user system elapsed
    BDR> 0.174 0.005 0.187
>> X11(type="cairo")
>> system.time(doplots(df))

    BDR> user system elapsed
    BDR> 2.315 0.035 2.388
>> X11(type="nbcairo")
>> system.time(doplots(df))
    BDR> user system elapsed
    BDR> 1.844 0.057 1.920
    BDR> However, I think the plots produced are pretty uniformative whereas using 
    BDR> a smaller translucent filled disc as the symbol would give more 
    BDR> information (and "Xlib" cannot do that).

I completely agree.

    BDR> The BioC package flowViz has some quite extreme examples of arrays of 
    BDR> scatterplots of ca 25,000 points, and they are acceptably fast with 
    BDR> type="cairo" on my system (they certainly plot much faster than I would 
    BDR> need to appreciate what they are trying to say).

    BDR> It is very easy to change the default default (X11.options(type="Xlib") in 
    BDR> .Rprofile), and so the only question was 'what is best for most users?'.
    BDR> As we think they will have local displays and be working with hundreds 
    BDR> rather than tens of thousands of points, the current default default seems     BDR> the best compromise.

I entirely agree. I do like the new default quite a bit, and only very rarely am bothered with some slowness.

The only reason I chimed in, was that I felt the slowdown was more noticable in some cases than I thought originally, and I was also negatively supprised how much more noticable on my notebook with sub-optimal but neither cheap nor really old hardware.

I'd never even consider changing the default; but I would quickly fire up an x11(type="Xlib") if I needed it in some cases.

I think we've made a very nice step forward with the cairo-enabled x11 device, and am particularly grateful for the work you've put into that.

Martin Maechler

    Bdr> Incidentally, windows() and quartz() are nowhere near as fast as Xlib on     BDR> the same or similar hardware. On my laptop

>> system.time(plot(F))

    BDR> user system elapsed
    BDR> 0.14 0.43 0.72
>> system.time(doplots(df))

    BDR> user system elapsed
    BDR> 0.38 0.58 1.25     BDR> and I don't usually feel that machine is slow (it was its 3rd birthday     BDR> last week).

    BDR> I don't know how you live without graphics acceleration -- I've seen it on 
    BDR> my systems (1600x1200 and 1680x1050) when drivers have failed to update 
    BDR> and know I don't even want to text edit without it.


______________________________________________ mailing list Received on Sat 05 Apr 2008 - 20:33:48 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 06 Apr 2008 - 02:31:03 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive