ggplot2 – How to make a scatterplot with positive and negative x-axis in R Studio?
I want to make a scatterplot that displays the positive y-axis and the negative and positive x-axes. Points will be either open or filled based on which month the data is from, and will have a different shape for each individual we collected data from. The origin will represent time 0 (when an event happened), and the negative x-axis will represent time before the event, positive x-axis is the time after the event. I also want to look at the difference in the mean slope of the points between before and after the event. I’ve included a photo of what I’m aiming for (this image doesn’t include the different shapes for different individuals, just a rough sketch of what I’m looking to make). If you need any more information on my data, happy to provide that. It doesn’t seem to let me post images since this is my first time posting on this site. Thank you!
I have not tried to experiment with this yet, since I’m very new to using R Studio and haven’t been successful finding other’s code for a similar plot.
Read more here: Source link