[R] variable png-size in multiple figure environment
Marc Schwartz
MSchwartz at mn.rr.com
Wed Jun 8 17:29:14 CEST 2005
On Wed, 2005-06-08 at 16:46 +0200, Claude Théato Kobe wrote:
> If I put only one plot in a png, I can drag the generated png on the
> edges and it changes its size by this. But when I put several plots
> on the same sheet using mfrow, the size can no longer be changed when
> viewing the file, and the resolution is bad. What do I need to do to
> keep the variability of size in a multiple figure environment?
I have no problem resizing either type of PNG file using ImageMagick
under FC3 by dragging a corner with a mouse, so I suspect the behavior
may be a function of your viewing application. For example, using other
viewers I can zoom in and out, but not drag to resize.
Don't use a bitmapped graphic format if you need to resize, as these do
not resize well, especially diagonal and curved lines.
You should use a vector based format if you need to re-size the image
and maintain image quality. Depending upon your platform (which you do
not indicate) use:
WMF
PS/EPS
PDF
WMF will be available under Windows. The choice may depend upon what you
intend to do with the plots.
Alternatively, pre-specify the graphic device height and width using the
appropriate arguments to the functions so that the output image is as
close as possible to the actual size that you require. Note that for
bitmapped plots, these will be in pixels for the png() function and
inches if you use the bitmap() function, which requires ghostscript.
The combination of pixels and resolution settings will determine linear
size for a given output device when using bitmapped graphics.
See the help for the specific devices you wish to use or ?Devices for
general help.
HTH,
Marc Schwartz
More information about the R-help
mailing list