[R] Define absolute size of tick and axis labels in basic plots

David Winsemius dwinsemius at comcast.net
Sat Dec 18 04:00:19 CET 2010


On Dec 17, 2010, at 6:29 PM, Noah Lottig wrote:

> I am currently submitting final copies of graphics to a journal for  
> publication and they are asking that the fonts used in the plots are  
> times new roman and 10 pt.  I set the font size when I call the  
> graphics device and in the par statement to 10.  However, when I  
> create a plot, the tick labels and axis labels are not 10 pts.  I  
> know I can use the cex commands to scale the fonts, but is there a  
> way to set an absolute size for these parameters.

Use pdf() or ps()?


>
> Here is some dummy code that demonstrates my issue.
>
> rm(list = ls())
> graphics.off()
> quartz(width=2.5,height=7,pointsize=10,family="serif")
> par(mfrow=c(3,1),mar=c(3.5,3.5,0,0)+0.1,ps=10,family="serif")
> plot(rnorm(10),rnorm(10),col="white")
>
> mtext("Font Size 10",side=1,line=-15)
> par(ps=5)
> mtext("Font Size 5",side=1,line=-13)
> par(ps=7)
> mtext("Font Size 7",side=1,line=-11)
>
> Examining the text printed in the plot suggests to me that the plot  
> text is approximately 7pt instead of 10pt
>
> Thanks,
>
> Noah
>
>
> ----
> Noah R. Lottig
> Trout Lake Station
> 10810 County Hwy N
> Boulder Junction, WI 54512
>
> Phone: 715-356-9494
> Fax: 715-356-6866
> Email: nrlottig at wisc.edu
> Web: www.noahlottig.com
>
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list