November 2018
Beginner to intermediate
214 pages
5h 2m
English
In this section, we will be learning about various styles provided by Matplotlib such as temporary styles or creating your own custom styles. The following are a few examples of different styles:
# Temporary stylesplt.style.use('classic')from scipy.ndimage.filters import gaussian_filterplt.subplot(221)plt.plot(np.arange(0,1,0.01), np.power(np.arange(0,1,0.01), 3))plt.ylabel('Axis Label')plt.subplot(222)with plt.style.context('ggplot'): plt.scatter(np.random.normal(size=10), np.random.normal(size=10), c=np.random.normal(size=10))plt.subplot(223)plt.hist(np.random.normal(size=1000));plt.hist(np.random.normal(1, size=1000));plt.hist(np.random.normal(2, size=500));plt.ylabel('Axis Label')plt.xlabel('Axis Label')plt.subplot(224) ...Read now
Unlock full access