Newb199
Newb199

Reputation: 1

Changing the Color of a dataset of two graphs in matplotlib

im really new to Python and struggling with a task right now. Basically i have a Dataset containing two subsets of data. I have to plot this data in matplotlib, which i did. But now i have to change the colors of the two graphs (they have to be different) I tried plt.plot("dataset", color=['red', 'blue']); which results in an error.

Thanks in advance

Upvotes: 0

Views: 539

Answers (1)

agsmilinas
agsmilinas

Reputation: 11

You can try this:

import matplotlib.pyplot
matplotlib.pyplot.scatter([1,2,3],[4,5,6],color=['red','green','blue'])

Upvotes: 1

Related Questions