October 2018
Beginner to intermediate
676 pages
18h 30m
English
The following code block draws three plots with various labels to demonstrate how these can be customized:
fig, ax = plt.subplots(1, 3, figsize=(10,4))fig.subplots_adjust(wspace=0.7)
ax[0].hist(np.random.randn(1000))ax[0].set(xlabel='Bins', ylabel='Frequency')atitle = ax[0].set_title('Histogram', fontstyle='italic', fontsize=14)plt.setp(atitle,color='blue')
# Plot the bars for men's datamenMue = [3, 10, 100, 500, 50]menSigma = [0.75, 2.5, 25, 125, 12.5]index = np.arange(len(menMue)) # the x locations for the groupswidth = 0.35 # the width ...
Read now
Unlock full access