import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
fig1 = plt.figure(figsize=(8, 5))
ax11 = fig1.add_subplot(211, projection='3d')
ax12 = fig1.add_subplot(212)
fig1.get_size_inches()
fig2 = plt.figure(figsize=(4, 4))
ax21 = fig1.add_subplot(211, projection='3d')
ax22 = fig1.add_subplot(212)
fig2.get_size_inches()
fig1.savefig('fig1.png', dpi=300)
fig2.savefig('fig2.png', dpi=300)
Set size of matplotlib figure with 3d subplots