Re: [R] fonts in mosaic

From: Erich Neuwirth <erich.neuwirth_at_univie.ac.at>
Date: Sat, 02 Apr 2011 12:02:40 +0200

The problem of changing the default font used fpr the windows graphics device seems to be quite complicated.
As I wrote already

windowsFonts(myfont="Consolas")
par(family="myfont")

will make the windows graphics device use Consolas as the defaut font for labels.

Therefore, a function call like
plot(1:10,main="Title")
will use Consolas for labeling.
It will, however, not change the default for

mosaic(UCBAdmissions)

The mosaic plot will still use the original default font for the device, which in a standard configuration seems to be Arial.

par(family=NULL)
will reset the current default font to the original default font, so after this command
plot(1:10,main="Title")
will use Arial again.

The the font family used in graphics from package grid is set by explicitly using gpar paramenter in calls to functions from that package. gpar has default values, but there seems to be no way of changing the default values of the gpar object.

Does anybody on the list know if there is a way of changing the default values of gpar objects?



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. Received on Sat 02 Apr 2011 - 10:18:01 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 02 Apr 2011 - 15:30:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive