Issue with ax.set_position() not working for subplot added with add_subplot()


I am not sure if this is a good place to post programming questions, but I am having an issue that I would love some advice on. If that is not what this message board is really for, please ignore this post!

I am trying to use the ax.set_position() function to modify the positions of subplots in a figure. This works correctly for axes that I create using plt.subplots, for example if I do fig, (ax1, ax2) = plt.subplots(nrows=1, ncols=2, figsize=(8, 4)) I can then modify the position of ax1 and ax2. But if I create subsequent subplots using fig.add_subplots() , e.g: fig.add_subplots(ax3) , then ax3 does not change position when I use the set_position() function on it. I have also tried to affect the translation using Affine2D().translate , but (as noted in this post on StackExchange Adjusting the position of a matplotlib floating axis in a subplot, and reversing an axis direction) this does not appear to work. Is there a reason that none of these methods are working in this case, and is there a way to get around it? Thanks you so much!