Why is this code not changing the size of the figure plotted?
fig1, ax1 = plt.subplots(nrows=1, ncols=3)
fig1.set_figheight = 30
fig1.set_figwidth = 30
fig1.set_figheight = 30
assigns 30
to the .set_figheight
attribute. While previously fig1.set_figheight
was a method that could be used to change the height of the figure, from now on it is, well, simply 30
.
The solution is simple: Use the method instead of destroying it.
fig1.set_figheight(30)
Note that because you have overwritten the method you will need to restart the kernel, such that matplotlib can be reimported and the attribute is restored to its original state.