[Solved] scatter plot of different color in R


Your question is not very clear, but assuming your data is in df, it sounds like you want something like this to get started:

plot(1:5, df$var1, pch=19, col="blue", ylim=c(0,80))
points(1:5, df$var2, pch=19, col="red")

As for the trend of the data, what do you mean? A trend for each line? Or do you actually want to plot var1 against var2 (I have assumed you don’t want that otherwise there would be no point having two colours).

4

solved scatter plot of different color in R