IamTheWalrus
IamTheWalrus

Reputation: 604

matplotlib pyplot.plot() marker colors

The code:

plt.plot(x,"g.")
plt.show()

generates: enter image description here

When I try to specify colors in another way, lines are added:

plt.plot(x,"darkgreen",marker=".")
plt.show()

enter image description here

I don't need the lines. How can I use colors apart from the single character codes, without having the lines added to the plot?

Upvotes: 3

Views: 3804

Answers (1)

user8153
user8153

Reputation: 4095

Set linestyle to "None":

plt.plot(x,color="darkgreen",marker=".", linestyle="None")

Upvotes: 4

Related Questions