I have stacked into the question: I need to plot the image with DPI=1200 and specific print size.
By default the png looks ok…

png("test.png",width=3.25,height=3.25,units="in",res=1200)
par(mar=c(5,5,2,2),xaxs = "i",yaxs = "i",cex.axis=1.3,cex.lab=1.4)
plot(perf,avg="vertical",spread.estimate="stddev",col="black",lty=3, lwd=3)
dev.off()
But when I apply this code, the image became really terrible it’s not scaling (fit) to the size that is needed. What did I miss? How to “fit” the image to the plot?
,
A reproducible example:
James’s suggestion of using
pointsize, in combination with the variouscexparameters, can produce reasonable results.Of course the better solution is to abandon this fiddling with base graphics and use a system that will handle the resolution scaling for you. For example,