pyplot common labels

Solutions on MaxInterview for pyplot common labels by the best coders in the world

showing results for - "pyplot common labels"
Máximo
31 Sep 2020
1# plot something
2fig, axs = plt.subplots(3,3, figsize=(15, 8), sharex=True, sharey=True)
3for i, ax in enumerate(axs.flat):
4    ax.scatter(*np.random.normal(size=(2,200)))
5    ax.set_title(f'Title {i}')
6
7# set labels
8plt.setp(axs[-1, :], xlabel='x axis label')
9plt.setp(axs[:, 0], ylabel='y axis label')
10
11
similar questions
queries leading to this page
pyplot common labels