On 15.08.2011 23:31, Filoche wrote:
Hi everyone.

I'm using this following code:

pdf(file="Fig5.pdf", width = 4.86, height = 6.29, pointsize = 10, family
='Times')
par(mfcol = c(3,2), mai = c(0.4,0.8,0,0), omi = c(0.7, 0, 0.7, 0.1));
hist( rnorm(100) )
dev.off()

When I open this in any vectorial software (like Illustrator), it says that
my font size is 7 instead of 10 that I specified.


I have tried (whitout the PAR line):

pdf(file="Fig5.pdf", width = 4.86, height = 6.29, pointsize = 10, family
='Times')

hist( rnorm(100) )
dev.off()

And this is working.


Anyone know why the font size is not retained when I use PAR? It seems that
R is adjusting font size when using PAR to split my device into subplot.


Right, it is reduced in the case of splitting the decice, see ?par and its section about "mfcol" as the posting guide asks you to do before posting:

    In a layout with exactly two rows and columns the base value
          of ‘"cex"’ is reduced by a factor of 0.83: if there are three
          or more of either rows or columns, the reduction factor is
          0.66.


Uwe Ligges



Regards,
Phil

--
View this message in context: 
http://r.789695.n4.nabble.com/Font-size-R-tp3745762p3745762.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to