Skip to content
Prev 12167 / 15075 Next

Poor plotting performance on Mac OS X

For what it's worth, here is my experience on a late 2013 Mac Pro.
(I normally run R from an xterm shell within an X Windows context)

The best performance for displaying the image on-screen uses cairographics and Polypath. It's the only one fast enough to be satisfactory for interactive use, in my opinion [though x11(type='Xlib') could be tolerated]. pdf() is even faster.

-Don
OGR data source with driver: ESRI Shapefile 
Source: "data", layer: "SA3_2016_AUST"
with 358 features
It has 9 fields
Warning message:
In readOGR("data", "SA3_2016_AUST", stringsAsFactors = FALSE) :
  Dropping null geometries: 93, 94, 161, 162, 245, 246, 275, 276, 311, 312, 328, 329, 339, 340, 351, 352, 357, 358

## The "original" X windows device (does not support Polypath)
user  system elapsed 
  0.882   0.512  99.618 

## a more "modern" version of the X windows device
user  system elapsed 
  2.233   5.007  68.410 


## Polypath gives large improvement
user  system elapsed 
  1.772   0.461   5.785 

## Same R session as above, but using the quartz device
user   system  elapsed 
1135.606    1.556 1137.445
user  system elapsed 
  2.029   0.200   2.248
R version 3.4.1 (2017-06-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: OS X El Capitan 10.11.6

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

locale:
[1] C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] rgdal_1.2-8 sp_1.2-5   

loaded via a namespace (and not attached):
[1] compiler_3.4.1  tools_3.4.1     grid_3.4.1      lattice_0.20-35