[R] Speeding up image plots

Scionforbai scionforbai at gmail.com
Mon Oct 1 11:46:36 CEST 2007

> I wonder whether it is possible to speed up plots of 2-dimensional
> images (such as image() or levelplot()) in order to export lower quality
> versions of the resulting plots.

> But the underlying arrays are
> so big (900x900 entries) that the export of every single image takes
> very long.

I think the only way is to upscale your arrays before calling image()
or levelplot(), maybe with a simple fortran or C routine who scales
the original to a 450x450 (mean of 2x2 pixel blocks, if your values
are summable).
Or you just do a sample() of your original array, provided it has a
certain degree of continuity.
I very often have to produce 512x512 images, and it doesn't seem to be
any particularly intensive procedure; I mean, it is done within

More information about the R-help mailing list