Claudia Penaloza
2012-Sep-20 17:47 UTC
[R] Plot to tiff, font size problem in multiple plot figures
I am creating graphs for a publication and would like them to have the same font size... but when I create a figure with multiple plots, the font size decreases even though I haven't changed the tiff() resolution or pointsize specifications, I have increased the figure size according to how many plots it will ultimately have, and I have made sure the margins are equivalent for single and multiple plot figures... example code below (font size is consistent between 1x1 and 2x1 figure but decreases for 3x2 figure): tiff("1x1.tif", width=3,height=2.5,units="in",res=600,pointsize=8,compression="lzw",restoreConsole=T) par(mfrow=c(1,1),mar=c(4,4,.5,.5)+0.1) plot(x=rnorm(10),y=rnorm(10)) dev.off() tiff("2x1.tif", height=2.5*2,width=3,units="in",res=600,pointsize=8,compression="lzw",restoreConsole=T) par(mfrow=c(2,1),mar=c(2,4,2.5,0.5)+0.1) plot(x=rnorm(10),y=rnorm(10),xaxt="n",xlab="") par(mar=c(4,4,0.5,0.5)+0.1) plot(x=rnorm(10),y=rnorm(10)) dev.off() tiff("3x2.tif", height=2.5*3,width=3*2,units="in",res=600,pointsize=8,compression="lzw",restoreConsole=T) par(mfrow=c(3,2),mar=c(.5,4,4,0.5)+0.1) plot(x=rnorm(10),y=rnorm(10),xaxt="n",xlab="") par(mar=c(.5,2,4,2.5)+0.1) plot(x=rnorm(10),y=rnorm(10),xaxt="n",xlab="",yaxt="n",ylab="") par(mar=c(2.5,4,2,0.5)+0.1) plot(x=rnorm(10),y=rnorm(10),xaxt="n",xlab="") par(mar=c(2.5,2,2,2.5)+0.1) plot(x=rnorm(10),y=rnorm(10),xaxt="n",xlab="",yaxt="n",ylab="") par(mar=c(4.5,4,0,0.5)+0.1) plot(x=rnorm(10),y=rnorm(10)) par(mar=c(4.5,2,0,2.5)+0.1) plot(x=rnorm(10),y=rnorm(10),yaxt="n",ylab="") dev.off() Why is this happening? Any help greatly appreciated. claudia [[alternative HTML version deleted]]
Maybe Matching Threads
- Saving multiple 3x3 TIFF graphics inside a loop
- problem with lattice tiff or bitmap: character size and color
- Saving multiple plots using tiff function
- tiff(), jpeg(), and png() in R 2.7.0: problems if 'units = "in"' but default height and width
- MakeActiveBinding help needed