Plotting across different dataframes in R -
i have multiple dataframes each having x , y column. x values same dataframes y values differ.
i wish plot on single graph y values dataframes, corresponding each x value.
i have tried using plot function, doesn't seem offer such functionality.
please me out. in advance!
using roland's data:
set.seed(42) df1 <- data.frame(x=1:5, y=rnorm(5)) df2 <- data.frame(x=1:5, y=rnorm(5)) df3 <- data.frame(x=1:5, y=rnorm(5))
try:
ggplot()+ geom_point(data=df1, aes(x,y), color='red')+ geom_point(data=df2, aes(x,y), color='blue')+ geom_point(data=df3, aes(x,y), color='green')
Comments
Post a Comment