October 2018
Beginner to intermediate
676 pages
18h 30m
English
The following code block plots a sigmoid curve and text object on the graph, with the path_effects attributes:
plt.style.use('seaborn-darkgrid')
plt.subplots(figsize=(10,6))
x = np.linspace(-10, 10, 50)y = 1.0 / (1 + np.exp(-x))
t = plt.text(-10., 1.15, 'Sigmoid with Path Effects', fontsize=40, weight=50, va='center', path_effects=[PathPatchEffect(offset=(3, -3), hatch='xxxx', facecolor='gray'), PathPatchEffect(edgecolor='white', linewidth=1.1, facecolor='black')])
Read now
Unlock full access