April 2018
Beginner to intermediate
300 pages
7h 34m
English
We can have further refined control over marker styles with some more keyword arguments. For example, for plt.plot(), we can change the markeredgecolor, markeredgewidth, and markerfacecolor.
Here is a code example:
import numpy as npimport matplotlib.pyplot as pltimport matplotlib.colors# Prepare data pointsx = list(range(5))y = [1]*5# Set the face color, edge color, and edge width of markersplt.plot(x,y,marker='o',ms=36,markerfacecolor='floralwhite',markeredgecolor='slateblue',markeredgewidth=10)plt.show()
This is the result of adding the extra keyword arguments:

Read now
Unlock full access