Skip to content
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

Connecting data points across repeated measures conditions #92

Open
wildetudor opened this issue Jan 25, 2020 · 2 comments
Open

Connecting data points across repeated measures conditions #92

wildetudor opened this issue Jan 25, 2020 · 2 comments

Comments

@wildetudor
Copy link

Dear Pier,

I have repeated measures data from subjects across multiple conditions, that I'd like to show as raw data points + boxplots. I am using a combination of g.stat_boxplot and g.geom_jitter for this.

I would also like to connect data points across these conditions, to help visually identify subjects. A bit like this:
20200114_163336

The only such functionality I found in gramm was the 'geom',{'line', 'lines'} argument of g.stat_summary. However, that just connects the means/error bars, not the actual data points.

I could easily manually draw the lines myself in a for loop, however adding content to a gramm figure (with update) seems rather difficult/unstable.

Are you able to help? Thank you so much!

Tudor

@piermorel
Copy link
Owner

Hi Tudor,

It's indeed kind of possible to do what you want with update() and providing your subjects as a 'group' variable in the update() call, and then using geom_line(). For now that is the only way I see do do that within gramm.
However, it won't work well with geom_jitter() because geom_line() doesn't know about the jitter.

Let me know if that helps, but here we are at the limit of what is possible within gramm, especially since update() is a kind of hack that only works in certain cases.

@wildetudor
Copy link
Author

Alright, thanks Pier, that's stil helpful, will try to see if I can do this somehow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants