matplotlib scatter plot with different markers and colors
问题 I would like to make a plot with different markers and different colors according to the values of 2 external vectors. Here what I have tried: >>> s = [u'+', u'+', u'o'] >>> col = ['r','r','g'] >>> x = np.array([1,2,3]) >>> y = np.array([4,5,6]) >>> pl.scatter(x,y,marker=s,c=col) Traceback (most recent call last): File "/usr/lib/python3/dist-packages/matplotlib/markers.py", line 233, in set_marker Path(marker) File "/usr/lib/python3/dist-packages/matplotlib/path.py", line 133, in __init__