Charles Plessy
2012-Sep-05 10:30 UTC
[R-sig-Debian] Refresh times very slow for simple plots.
Hello everybody, On my system (R 2.15.1-4 on Debian Stable plus some updates), resizing graphic windows (by stretching their borders with the mouse) takes one order of magnitude more time than redrawing them (by running the command again). For instance, the command ??plot(data.frame(rnorm(10), rnorm(10), rnorm(10)))?? is executed almost instantely, but if I resize the graphics window, it takes 3 to 4 seconds to refresh. It looks related to drawing the lines making the frames, the axis and the ticks, for instance ??heatmap(cor(data.frame(rnorm(10), rnorm(10), rnorm(10))))?? is also strongly affected. Even if each dendrogram is only made of five segments, I can see them being plotted one after the other. This becomes very handicaping when working on real-life datasets, as a graph that takes a few seconds to draw will block my session for a few minutes if I resize it by mistake. I was wondering if somebody else was affected by this strange bug ? As per the R FAQ here is the output of sessionInfo() R version 2.15.1 (2012-06-22) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_GB.utf8 LC_NUMERIC=C [3] LC_TIME=en_GB.utf8 LC_COLLATE=en_GB.utf8 [5] LC_MONETARY=en_GB.utf8 LC_MESSAGES=en_GB.utf8 [7] LC_PAPER=C LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_GB.utf8 LC_IDENTIFICATION=C attached base packages: [1] splines stats graphics grDevices utils datasets methods [8] base other attached packages: [1] gdata_2.8.0 edgeR_2.6.1 limma_3.12.1 vegan_2.0-3 permute_0.7-0 loaded via a namespace (and not attached): [1] grid_2.15.1 gtools_2.6.2 lattice_0.18-8 Have a nice day, -- Charles Plessy Tsurumi, Kanagawa, Japan
Dirk Eddelbuettel
2012-Sep-05 11:44 UTC
[R-sig-Debian] Refresh times very slow for simple plots.
Yes, I suffer from that too, especially as I mostly have the x11() windows pop up on a machine different from the one doing the calculation (the latter being a headless server). If you look at help(x11), you see that there are (at least) three device types. At one point I made 'nbcairo' (non-buffered cairo) the default and it seemed to help. The real culprit, though, is the R device model. And a real alternative is offered eg by Simon's 'xplots extremes' using OpenGL acceleration, see http://rforge.net/Acinonyx/ He gave absolutely stunning live presentations using this. May be a good alternative for 'large' data. Dirk -- Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com