From the documentation of plt.plot:
matplotlib.pyplot.plot(*args, scalex=True, scaley=True, data=None, **kwargs)
The function takes **kwargs
:
**kwargsLine2D properties, optional kwargs are used to specify properties like a line label (for auto legends), line-width, antialiasing, marker face color
[...]
Here is a list of available Line2D properties:
[...]
markeredgecolor
or mec color
markeredgewidth
or mew float
markerfacecolor
or mfc color
markerfacecoloralt
or mfcalt color
So, you can feed markerfacecolor
and markeredgecolor
as keyword arguments:
x = np.random.randint(0,10,5)
y = np.random.randint(0,10,5)
plt.plot(x, y, '-bD', c='blue', mfc='red', mec='k')
