Re: [R] ggplot facet label font size

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Fri 04 Aug 2006 - 13:32:21 EST

Just sending this to you. One thing that might be easy to do yet give a lot of flexibility is to:

  1. put meaningful names on the grobs. Even with just this it would be possible to do a getNames() in grid and then from inspection grid.edit the appropriate one(s).
  2. create a routine that retrieves grobs so one does not have to use getNames with grep.

trellis.focus and friends do this in lattice.

Regards.

On 8/3/06, hadley wickham <h.wickham@gmail.com> wrote:
> Hi Sam,
>
> > How do I change the font size in the facet labels along the edges of the
> > plot?
>
> Unfortunately, you can't currently change the size of those fonts.
> However, it is on my todo list (as well as completely custom strip
> functions) and should be available in the near future.
>
> One thing you could do is have a look at ggopt, where you can at least
> change the strip text, if not the size.
>
> Regards,
>
> Hadley
>
> On 8/2/06, Walker, Sam <s-walker@ti.com> wrote:
> >
> > For example (from the ggplot help file):
> > p<-ggplot(tips, sex ~ smoker, aesthetics=list(x=tip/total_bill))
> > gghistogram(p)
> >
> > In this plot, the facet labels are "smoker: No", "smoker: Yes", "sex:
> > Female", "sex: Male". What command can I use to reduce the font size of
> > these labels?
> >
> > In lattice terminology, cex is used to scale these strip labels. But I
> > couldn't find the equivalent in ggplot.
> >
> > The reason I'm asking is I have a 9x7 array of plots which I've been
> > plotting with lattice. I wanted to use ggplot because I like having the
> > labels on the edge of the plots, but the label font size is too large
> > and exceeding the size of the label box.
> >
> > Thanks in advance...
> > -Sam
> >
> > ______________________________________________
> > R-help@stat.math.ethz.ch 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@stat.math.ethz.ch 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@stat.math.ethz.ch 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 Fri Aug 04 13:40:05 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 04 Aug 2006 - 16:16:57 EST.

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