Issue
I do not want to connect points with lines. I know that for that I can use scatter. But, scatter does not work after plot.
So, basically I have to lists of points. The points from the first list I do want to connect with lines while the points from the second list should not be connect with lines.
How can one achieve it in matplotlib?
This is what I have tried:
plt.figure()
plt.plot(xys[:,0], xys[:,1], marker='o', color='g')
# WHAT SHOULD I DO HERE?
#plt.plot(xys_bad[:,0], xys_bad[:,1], color='r', linewidth=0.0, markersize = 10.0)
plt.scatter(xys_bad[:,0], xys_bad[:,1], color='r')
plt.show()
Solution
As describe in matplotlib documentation you should use the 'None'
linestyle
:
plt.plot(xys_bad[:,0], xys_bad[:,1], color='r', linestyle='None', markersize = 10.0)
Answered By - Xavier C.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.