April 2018
Beginner to intermediate
300 pages
7h 34m
English
Dash patterns of lines are designated by the linestyle or ls parameter. It can sometimes be used as a positional argument for convenience. For example, in line plots, we can specify the following:
The following is an example of lines in different dash patterns:
import matplotlib.pyplot as plt# Prepare 4 data series of sine curvesy = [np.sin(i) for i in np.arange(0.0, 10.0, 0.1)]dash_capstyles = ['-','--','-.','.',':']# Plot each data series in different cap dash stylesfor i,x in enumerate(dash_capstyles): ...
Read now
Unlock full access