-
Notifications
You must be signed in to change notification settings - Fork 4
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
Problem conecting lines in rain.side = 'f2x2' #6
Comments
Hey, I have actually come across this issue before! Thanks for the reproEx. It is because the data structure is incorrect, so you have the same subject id "ID" for subjects with (cond_1 A + cond_2 C) & (cond_1 A + cond_2 D). You can see this for ID 1: So the behavior Yet, I personally recommend against that - people will look at a 2-by-2 plot and assume it is two groups (of different individuals). Instead, I would recommend making two 1-by-1 rain clouds and adding them together with patchwork. This will make it clearer to the reader that it is two different things/phenomena pre/post within the same individual. |
Thank you for your response! You are right. Since when you summarize data using dplyr it gives you a format similar to the example above, I usually deal with that problem from ggplot2 itself. For example, using To make it work with ggrain there would be an extra step to do when summarizing the data:
In my case this does the trick, following your suggestions. Regarding the last thing you comment about 2 x 2 raincloudplots, although it is simple to create two plots and then join them using patchwork, I was wondering if something like I tried changing the positions manually as you suggest in the vignette, but it didn't come out very well. Is there any way to adjust the positions when using this strategy? |
Manual adjustment should work. I would take the strategy of trying it for 1 plot subsetted and then faceting. Alternatively, maybe |
Hi! I wanted to report an error when trying to connect the dots of different conditions when rain.side = 'f2x2'. I followed your vignette explaining how to do it, but I don't know why it looks like the lines connect the points within each category on the x-axis.
Here is a reproducible example:
And here is the output of the above code:
I don't know exactly where the problem is, since the data structure should be correct.
Thanks you in advance!
The text was updated successfully, but these errors were encountered: