gramm icon indicating copy to clipboard operation
gramm copied to clipboard

Connecting data points across repeated measures conditions

Open wildetudor opened this issue 5 years ago • 2 comments

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

wildetudor avatar Jan 25 '20 20:01 wildetudor

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.

piermorel avatar Jan 26 '20 10:01 piermorel

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

wildetudor avatar Jan 27 '20 09:01 wildetudor