Here is the explanation of how it works:
- fig, ax = plt.subplots(1, 3, figsize=(10,4)) defines the figure layout.
- fig.subplots_adjust(wspace=0.5) adjusts the space in between the subplots.
- ax[0].hist(np.random.randn(1000)) plots the histogram on axes 0, followed by labels for the X and Y axes, then title for the plot.
- ax[0].set_title() includes font style and size arguments apart from the title text, but it does not have the color argument; hence, we use plt.setp(atitle,color='blue') to set the color for the title.
- plt.rcParams['axes.labelsize'] = 10 and plt.rcParams['axes.labelweight'] = 'bold' set the font size and weight for x and y axes labels for all the plots. Here, we have labels only for the first plot, hence, they ...