Automatically get the dimensions or indices of gridspec axes
Automatically get the dimensions or indices of gridspec axes Question: Given a gridspec object in matplotlib, I want to automatically iterate through all its indices so I can add the corresponding Axes automatically, something like: for i, j in gspec.indices: # whatever those indices are axs[i,j] = fig.add_subplot(gspec[i][j]) How do I do that, without knowing …