[R] fonts in mosaic
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed Mar 30 21:37:04 CEST 2011
On Wed, 30 Mar 2011, Achim Zeileis wrote:
> On Wed, 30 Mar 2011, Erich Neuwirth wrote:
>
>> Achim
>> I simply want to replace the font R uses on mosaic (whatever it is)
>> by a font of my choice (say Calibri or Arial)
>> because I need to embed the R charts in a PowerPoint
>> presentation and want the fonts to match.
>
> Ah, ok, sorry I misread your mail.
>
>> And I want the most simple way of accomplishing this.
>> I worked my way through the strucplot vignette,
>> but I could not extract enough information there.
>> Is there some information about the proper font names
>> to use in R?
>
> Hmm, if you look at
>
> help("gpar", package = "grid")
>
> it allows specification of a "fontfamily" argument. But I'm not sure how this
> can be utilized to specify certain TTFs. But I remember seeing posts on the
> mailing list related to this.
>
> In any case, I don't think that this is specific to "vcd" but pertains to
> "grid" in general.
Rather, it is specific to the device, which EM has not told us. But
win.metafile() defaults to Arial, and how to select other fonts is in
the rw-FAQ.
>
> hth,
> Z
>
>>
>>> Personally, I simply change the size of the device I'm plotting on. When
>>> I plot on a large device, the fonts will be relatively smaller, and vice
>>>> versa. This is what I do when including graphics in PDF files (papers,
>>>> slides, reports, etc.).
>>>>
>>>> For fine control, you can set the arguments of the labeling function
>>>> employed. ?strucplot shows that the default is ?labeling_border which
>>>> has several arguments. For example you can set the graphical parameters
>>>> of the labels (gp_labels) or the graphical parameters of the variable
>>>> names (gp_varnames). Both arguments take ?gpar lists ("grid" graphical
>>>> parameters). For example you may do
>>>>
>>
>> ______________________________________________
>> 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.
>>
>
> ______________________________________________
> 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.
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list