Nosey
Nosey

Reputation: 724

Increase font size of inplot mean for ggbetweenstats from ggstatsplot

How can I increase the font size of the mean in the plot when using ggstatsplot? ggbetweenstats in particular?

I can change the font size for everything using the code below, except the mean in the actual plot.

  ggplot.component = list(theme(text = element_text(size = 21))))

enter image description here

Code to generate above plot

ggbetweenstats(
  data = iris,
  x = Species,
  y = Sepal.Length,
  title = "Distribution of sepal length across Iris species"
)

Upvotes: 4

Views: 1646

Answers (1)

stefan
stefan

Reputation: 125228

You could set the font size and style the labels via centrality.label.args:

library(ggstatsplot)

ggbetweenstats(
  data = iris,
  x = Species,
  y = Sepal.Length,
  title = "Distribution of sepal length across Iris species",
  centrality.label.args = list(size  = 8)
)

Upvotes: 3

Related Questions