Reputation: 715
I have two variables I want to plot on a scatter graph. I want one variable to be displayed in blue and the other in red. I only just started using Python, and I am rather confused.
Upvotes: 1
Views: 3906
Reputation: 58594
scatter
takes an argument color
which allows you to set the point color (hard to guess).
x = linspace(0,10)
y1 = randn(50)
y2 = randn(50)+10
scatter(x, y1, color='red')
scatter(x, y2, color='blue')
Upvotes: 3