McClatchie, Sam (PIRSA-SARDI)
2006-Jun-30  01:41 UTC
[R] Trellis.par.set/ family/ global change font?
Background:
OS: Linux Ubuntu Dapper 6.06
release: R 2.3.1
editor: GNU Emacs 21.4.1
front-end: ESS 5.2.3
---------------------------------
Colleagues
I have a rather complicated trellis plot that a journal editor has requested I
edit and change all the fonts to times.
I'd like to change all fonts globally for the plot, as in
par(family="serif") for non-trellis plots. Various experiments with
trellis.par.set after reading the help page have not solved the problem for me.
Even doing the local change
trellis.par.set(par.xlab.text=list(cex=1.5, family="serif")) does not
change the font to times for xlab (I mean my syntax is wrong, not that there is
a bug).
So I'm obviously misreading the help page or just missing the meaning. Any
suggestions?
Thanks
Sam
----
Sam McClatchie,
Oceanography subprogram 
South Australian Aquatic Sciences Centre
PO Box 120, Henley Beach 5022
Adelaide, South Australia
email <mcclatchie.sam@saugov.sa.gov.au>
Cellular: 0431 304 497 
Telephone: (61-8) 8207 5448
FAX: (61-8) 8207 5481
Research home page <http://www.members.iinet.net.au/~s.mcclatchie/>
  
                   /\
      ...>><xX(°> 
                //// \\\\
                   <°)Xx><<
              /////  \\\\\\
                        ><(((°> 
  >><(((°>   ...>><xX(°>O<°)Xx><<
	[[alternative HTML version deleted]]
On 6/29/06, McClatchie, Sam (PIRSA-SARDI) <mcclatchie.sam at saugov.sa.gov.au> wrote:> Background: > OS: Linux Ubuntu Dapper 6.06 > release: R 2.3.1 > editor: GNU Emacs 21.4.1 > front-end: ESS 5.2.3 > --------------------------------- > > Colleagues > > I have a rather complicated trellis plot that a journal editor has requested I edit and change all the fonts to times. > > I'd like to change all fonts globally for the plot, as in par(family="serif") for non-trellis plots. Various experiments with trellis.par.set after reading the help page have not solved the problem for me. Even doing the local change > trellis.par.set(par.xlab.text=list(cex=1.5, family="serif")) does not change the font to times for xlab (I mean my syntax is wrong, not that there is a bug). > > So I'm obviously misreading the help page or just missing the meaning. Any suggestions?Lattice uses 'fontfamily' rather than 'family' (borrowed from grid, I suppose). I don't think there's a way to set the family globally. You might try trellis.par.set(grid.pars = list(fontfamily = "serif")) but I'm not sure if that will work. -Deepayan