I'm trying to place an Axes
within a Figure
so that the Axes
has substantial margins within the Figure
.
When I render it with plt.savefig
, it works fine:
fig = plt.figure(figsize=(4, 4))
ax1 = fig.add_axes([.3, .3, .1, .1])
ax2 = fig.add_axes([.6, .6, .1, .1])
plt.savefig("my figure", facecolor="grey")
But when I render it with plt.show
, it crops the Figure
to any contained Axes
:
fig = plt.figure(figsize=(4, 4), facecolor="grey")
ax1 = fig.add_axes([.3, .3, .1, .1])
ax2 = fig.add_axes([.6, .6, .1, .1])
plt.show()
How do I stop plt.show
from cropping the Figure
, and instead show the true size of the Figure
, like plt.savefig
does?