I've subplots having independent ylabels but also want to assign a common label that describes the overall operation.
fig, axarr = plt.subplots(nrows=7, ncols=1, figsize=(6,6))
axarr[0].plot(data, 'r')
axarr[0].set_ylabel('s', fontsize=14, rotation=90)
axarr[0].set_yticklabels([])
ds = [cA5, cD5, cD4, cD3, cD2, cD1][::-1]
ds_names = ["a5", 'd5', 'd4', 'd3', 'd2', 'd1'][::-1]
for ii in range(len(ds)):
axarr[ii + 1].plot(ds[ii], 'k')
axarr[ii + 1].set_ylabel(ds_names[ii], fontsize=14, rotation=90)
axarr[ii + 1].set_yticklabels([])
if ii == 0:
axarr[ii + 1].set_title("Approximation coefficients", fontsize=14, color='b')
plt.tight_layout()
plt.ylabel(r'wavelet decomposed $\zeta$, mm')
plt.xlabel('x,m')
plt.show()
Right now, I try to use plt to label the common label but that is not rendered well. Please find the attachment illustrating the problem. I was hoping someone might be able to help me out.
This is not duplicate to the question as alleged by a user. Here I'm looking for setting essentially two labels -- one common for all subplots and one for each subplot.