BTW, matplotlib has a nicer facility than add_subplot() for making grid plots:
fig, axes = plot.subplots(nrows=figdims, ncols=figdims) for dim, ax1 in zip(range(2, MAX_DIM), axes.flatten()[:(MAXDIM-2)]): . . .
BTW, matplotlib has a nicer facility than add_subplot() for making grid plots: