2

First of all, I apologize for my poor English.

I am using ggstatsplot::ggbetweenstats to compare my groups. However, I noticed that font size in p-values from these comparisons is small. Thus, I would like to ask some help to increase font size in these p-values. I will post my script using data from "Edgar Anderson's Iris Data" as example.

library(ggplot2)
library(RVAideMemoire)
library(ggpubr)
library(ggstatsplot)

iris.table <- iris

ggstatsplot::ggbetweenstats(data = iris.table, x = class, y = sepal_l, plot.type = "box", type = "parametric", k = 3, outlier.tagging = FALSE, mean.plotting = FALSE, xlab = "Species", ylab = "Sepal Length", ggstatsplot.layer = FALSE, pairwise.comparisons = TRUE, pairwise.display = "significant", p.adjust.method = "BH", point.args = list(position = ggplot2::position_jitterdodge(dodge.width = 0.15), size = 1.5, stroke = 0))+
  ggplot2::scale_color_manual(values = c("black", "black", "black"))+
  scale_x_discrete(labels = c("Iris setosa", "Iris versicolor", "Iris virginica"))+
  theme(text = element_text(size=13), axis.text.x = element_text(size = 12), axis.text = element_text(size = 13), axis.text.y = element_text(size = 12), plot.caption = element_text(size = 13), plot.subtitle = element_text(size = 13))
  

My Plot

1 Answer 1

3

This was indeed not straightforward to do with the current implementation.

I have added a new argument to change the aesthetics related to pairwise comparison geom now. Once you download ggstatsplot from GitHub, you can do something like the following:

set.seed(123)
library(ggstatsplot)

ggbetweenstats(
  iris, Species, Sepal.Length,
  pairwise.comparisons = TRUE,
  ggsignif.args = list(textsize = 6, tip_length = 0.01)
)

Created on 2020-08-18 by the reprex package (v0.3.0.9001)

Sign up to request clarification or add additional context in comments.

2 Comments

Is there a method to display less texts in the subtitle? for example, I want to show only p value in the subtitle, others such as confidence interval and t and g values are not needed.
Same as: github.com/IndrajeetPatil/ggstatsplot/issues/669 I might add support for this in the future releases.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.