-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
geom_tukey() in ggplot facet_wrap #2
Comments
I'm not sure I understand what you mean. Can you give an example? For example if you have a plot "p":
this first example will produce the correct plot:
whereas this second plot will come at wonky because geom_tukey doesn't know you have facets when you call it.
|
Thanks so much for the reply Ethan!
Sorry I didn't make myself clear, let me give you an example here:
Imagine that there are multiple observations (values) from three groups
under three conditions. I want to plot three plots for the conditions, each
plot will have the values by groups. And I want to test if the values are
different between groups in each plot. So I did:
ggplot(data, aes(x=group, y=values))+
boxplot()+
facet_grid(~condition)+
geom_tukey()
Assuming the observed values by group and condition are all different from
each other, we will end up with three plots, the Tukey significance letters
should be:
plot 1: a, b, c
plot 2: a, b, c
plot 3: a, b, c
This is what I meant by 'reset the significance letters from one plot to
another other'.
However, it seems like the significance letters continued across plots:
plot 1: a, b, c
plot 2: d, e, f
plot 3: g, h, i
It would be ok if I only have 3 groups by 3 conditions. But in reality, I
have 14 groups by 12 conditions. Thus, the final plots look very messy with
multi-alphabet significance letters.
I hope this makes my question clearer :) otherwise I can make some graph
when I am back in the office tomorrow.
Thanks so much for your help!
Mike
…On Wed, Dec 13, 2023, 4:29 PM Ethan Bass ***@***.***> wrote:
I'm not sure I understand what you mean. Can you give an example?
—
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BEU544I3UU6XTEEW22XBIW3YJHCTZAVCNFSM6AAAAABATFLCWGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJUGE2DKNJUGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Ah I understand what you mean now. Thanks for the clarification. You can control this behavior with the |
Perfect! It is working exactly how I wanted it.
Thanks so much for the help, Ethan!
Cheers,
Mike
…On Wed, Dec 13, 2023 at 5:54 PM Ethan Bass ***@***.***> wrote:
Ah I understand what you mean now. Thanks for the clarification. You can
control this behavior with the type argument. The default is the two-way
ANOVA. In this case, ggtukey will do a global test across all facets. To
just test for differences within the facetted groups, you can use type =
"one-way". I think this is the option you want.
—
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BEU544PSKM7DJJHXJM7ZFCTYJHMWDAVCNFSM6AAAAABATFLCWGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJUGM2DCOBZGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Dr Yiou ZHU, Mike
216, Nordnesborder 3, Havforskningsinstituttet
5005 Bergen, Norway
***@***.***
***@***.***
--------------------------------------------------------------------------
|
Excellent! |
Is there a way to treat the plots in a facet as individuals, so that the significance letters reset from one plot to another?
The text was updated successfully, but these errors were encountered: