October 2018
Beginner to intermediate
676 pages
18h 30m
English
The following code block plots four graphs, the fourth one is a subset of three axes, so it is axes within other axes (overlapping):
np.random.seed(19681211)
fig = Figure(figsize=(10,6), dpi=100)FigureCanvas(fig)fig.set(facecolor='c', alpha=0.1, edgecolor='m')
ax1 = fig.add_axes([0.0, 0.55, 0.4, 0.4])ax1.set_ylabel('volts')ax1.set_title('a sine wave')
t = np.arange(0.0, 1.0, 0.01)s = np.sin(2*np.pi*t)line, = ax1.plot(t, s, color='blue', lw=2)
Read now
Unlock full access