Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

facet label font size [duplicate]

Tags:

r

ggplot2

People also ask

How do I change font size in facets?

If we want to modify the font size of a ggplot2 facet grid, we can use a combination of the theme function and the strip. text. x argument. In the following R syntax, I'm increasing the text size to 30.

How do I change the size of a facet label in ggplot2?

For that, we use theme() function, which is used to customize the appearance of plot. We can change size of facet labels, using strip. text it should passed with value to produce labels of desired size.

How do I change the size of my Ggtitle?

To change the size of the title and subtitle, we add the theme() function to labs() or ggtitle() function, whatever you used. Here we use labs() function. Inside theme() function, we use plot. title parameter for doing changes in the title of plot and plot.


This should get you started:

R> qplot(hwy, cty, data = mpg) + 
       facet_grid(. ~ manufacturer) + 
       theme(strip.text.x = element_text(size = 8, colour = "orange", angle = 90))

See also this question: How can I manipulate the strip text of facet plots in ggplot2?