API: Raise ValueError in subplots if num refers to existing figure by Aaratrika-Shelly · Pull Request #31230 · matplotlib/matplotlib
I had some question if we want to go straight to error or start with a warning, but Tim's point in the issue about now wanting to accidentally register a figure with pyplot is a good one so we should go straight to error even if we risk breaking some users. I am sure there exists at least one user who is doing:
plt.subplots(3, 3, num=1, gridspec_kw={'left': 0, 'right':.5})
plt.subplots(num=1, gridspec_kw={'left': .5, 'right':1})
to layout a figure.