matplotlib 3D绘图警告(matplotlib笔记5)

警告内容

MatplotlibDeprecationWarning: Axes3D(fig) adding itself to the figure is deprecated since 3.4. Pass the keyword argument auto_add_to_figure=False and use fig.add_axes(ax) to suppress this warning. The default value of auto_add_to_figure will change to False in mpl3.5 and True values will no longer work in 3.6. This is consistent with other Axes classes.
ax = Axes3D(fig)

只需添加

ax=Axes3D(fig,auto_add_to_figure=False)

fig.add_axes(ax)

即可

你可能感兴趣的:(3d,线性代数,几何学)