Skip to content
Prev 277878 / 398506 Next

tip: large plots

Hi all,

I'm working with a bunch of large graphs, and stumbled across
something useful. Probably many of you know this, but I didn't and so
others might benefit.

Using pch="." speeds up plotting considerably over using symbols.
user  system elapsed
  1.042   0.030   1.077
user  system elapsed
 37.865   0.033  38.122

If you have enough points, the result is also more legible.

Choice of which pch symbol makes a difference too, the default pch=1 being
the slowest of what I tried, but "." is by far the speediest.
user  system elapsed
 11.191   0.011  11.270
user  system elapsed
 38.024   0.008  38.245
user  system elapsed
 14.140   0.027  14.270
user  system elapsed
 15.696   0.011  15.799
user  system elapsed
 18.770   0.007  18.888

This is a vanilla R session, 2.13.1 for x86_64-redhat-linux-gnu. I
haven't tried it on any other OS, but it's making my life a lot
smoother right now.

Sarah