Skip to content

Maintain proportions while reducing graphic output size

2 messages · Jason Pare, Glen A Sargeant

#
lawnboy34 wrote:
See the helpfile for png().

If you change the width and height of your output, you should rescale the
pointsize of plotted text accordingly.  For example: 

#Without rescaling pointsize for text
png("temp1.png",width=200,height=200)
plot(rnorm(100),rnorm(100),main="A title of some sort")
dev.off()

#With pointsize for text rescaled
png("temp2.png",width=200,height=200, pointsize=6)
plot(rnorm(100),rnorm(100),main="A title of some sort")
dev.off()