Skip to content

how to make the figure more clearly

2 messages · Abelian, jdeisenberg

#
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

the code is follwed
jpeg(filename=....,width = 1200, height = 800, pointsize = 14)
..............
dev.off()

so, how can i make the figure more clearly?
Or should I change the other way to show off my figures?
Sincerely
#
Abelian-2 wrote:
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
edges.

Try this:

png(filename="something.png",width=600,height=400, pointsize=14)
plot(x,y)
dev.off()