Skip to content

plot.type stuck to default in grouped_ggbetweenstats #1033

@LaviniaUscatescu

Description

@LaviniaUscatescu

Hi, Indrajeet,

I love ggstatsplot, and am now exploring different options. Specifically, I am using grouped_ggbetweenstats and am trying to set plot.type to 'violin'. My trouble is that it doesn't seem to work, as I only get a boxviolin plot by running the code below.

I made sure I am using the latest versions of both ggstatsplot and ggplot2.

Below is my code and the resulting plot.
I would be very grateful for any help.
Thank you

setting the seed

set.seed(123)

big plot

between <- grouped_ggbetweenstats(
data = tarlevel,
x = Group,
y = RT,
grouping.var = Level,
plot.type = 'violin',
p.adjust.method = "bonferroni",
annotation.args = list(title = "Between Group Differences per Condition"),
centrality.plotting = F
)

set details for the first half of the big plot

between[[1]] <- between[[1]] +
scale_color_manual(values = c("darkred", "darkorange"),
name = "Group",
labels = c("ASD","CTR")) +
theme(axis.title = element_text(size=14,face="bold"),
axis.text.y = element_text(size=12, face = "plain"),
axis.text.x = element_text(size=12, face = "plain")) + labs(caption = NULL)

set details for the second half of the big plot

between[[2]] <- between[[2]] +
scale_color_manual(values = c("darkred", "darkorange"),
name = "Group",
labels = c("ASD","CTR")) +
theme(axis.title = element_text(size=14,face="bold"),
axis.text.y = element_text(size=12, face = "plain"),
axis.text.x = element_text(size=12, face = "plain")) + labs(caption = NULL)

ta-daaaaa

print(between)

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions