if you just want to specify the color arbitrarily, do
color="k"
for black, and do
color="0.x"
for shades of gray, xcan be any number if 0.x is between 0 and 1.
But if you want the marker color to be determined by another array z, do
scatter(x,y,c=z, cmap=cm.Greys)
therefore for
from pylab import *
from random import random
r = range(10)
x = [3 + i + random() for i in r]
y = [50*i + random() for i in r]
x2 = [5 + i + random() for i in r]
y2 = [5*i + random() for i in r]
z2 = [i + random() for i in r]
scatter(x,y, c="0.1", marker = 'o', hold = True, label = 'collected underwear')
scatter(x2,y2, c=z2,marker = 's', hold = True, label = 'Profit!',cmap=cm.Greys)
legend(loc='upper left')
show()
you will have

source
share