[R] how to make the figure more clearly

jdeisenberg catcode at catcode.com
Thu Feb 19 08:15:05 CET 2009

Abelian-2 wrote:
> Dear all
> when i draw some figures by R, i try to use "jpeg" to display my
> result.
> However, it isn't still clear as i want.
> Especially when i compare the origial figures by R and the ".jpeg"
> file

JPEG is designed for photos (the "P" stands for "Photographic"). The
compression method is good for images with smooth color variation. (In fact,
the method is "lossy" -- it loses some of the original pixels, but in a
photo, your eye can't detect the difference) On a line drawing, that same
loss of information is readily apparent; the edges of text look "fuzzy."

Try PNG instead. Its compression method is designed to be very efficient
with line art, and it doesn't lose any information. It will give a much more
crisp image that usually takes up less disk space. A sample plot( ) that I
did, saved both ways, gave a .jpg file of size 11014 bytes with a "fuzzy"
look. The .png file was only 1957 bytes, and the lines and text had sharp

Try this:

png(filename="something.png",width=600,height=400, pointsize=14)

View this message in context: http://www.nabble.com/how-to-make-the-figure-more-clearly-tp22094071p22095089.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list