October 2018
Beginner to intermediate
676 pages
18h 30m
English
The following code block plots four different types of graphs, all with the same style sheet, to demonstrate how to use a style sheet:
plt.style.use('seaborn-bright')
fig, ax = plt.subplots(1, 4, figsize=(10,5))fig.subplots_adjust(wspace=0.5)
ax[0].hist(np.random.randn(1000))
for i in range(3): ax[1].plot(np.random.rand(10))ax[1].legend(['a', 'b', 'c'], loc='lower left')
ax[2].scatter(np.random.rand(100),np.random.rand(100), s=100*np.random.rand(100)*np.random.rand(100)) ...
Read now
Unlock full access