Skip to content
Prev 324764 / 398503 Next

Lattice, ggplot, and pointsize

On Sun, May 26, 2013 at 12:47 AM, Milan Bouchet-Valat <nalimilan at club.fr> wrote:
If I remember correctly (it was a long time ago), I had nothing in
particular against the default text fontsize. The default symbol size
in grid was larger than I liked, and so fontsize$points was set to
something more reasonable, and fontsize$text just seemed natural to
add. It is only ever used in a single call to gpar() inside
print.trellis. So it seems perfectly reasonable to take the default of
fontsize$text from grid instead.

I don't like the idea of making the default
'get.gpar("fontsize")$fontsize' though, because that requires a device
to be active, which canonical.theme() doesn't by design. Instead I
have changed the default to NULL, and the fontsize is now set from (in
order of priority)

1. trellis.par.get("fontsize")$text  # NULL by default
2. trellis.par.get("grid.pars")$fontsize # NULL by default
3. get.gpars()$fontsize # approximately device pointsize by default

Hopefully this works for you. You can test using the r-forge version.

-Deepayan
[...]