Overlap (superimpose) line plots - but with a twist

Hi all,

I have two datasets that I need to overlap.

In the first dataset, there are 10 people, each with unique responses at 3 time points, and two response types (so two different colored lines). I have no issue plotting these on their own and wrapping the plots based on their IDs - so 10 different plots all at once in the same figure.

In the next dataset, I have single participant who responded at the latter two time points with only one type of response (so one more colored line, but different color than above). The caveat is that this person's responses should correspond with each individual from the above dataset. In other words, I want this single person's results to be plotted and overlapped/transposed with each of the above plots. So, this person's responses duplicated 10 times to overlap/transpose with the 10 individuals' plots above.

Any one have any idea on how to do this? Help is greatly appreciated :slight_smile:

Figured it out. Just added a new lines for geom_line and geom_point in the code for the 1st plot, but specifying the additional data set with data=

ggplot(datax,x=,y=,shape=,color=) + geom_line() +geom_point +
geom_line(data=Y) + geom_point(data=y)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.