axes3d专题

matplotlib 3D绘图警告;MatplotlibDeprecationWarning: Axes3D(fig) adding itself to the figure is deprecate

警告内容: 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 warni

TypeError: Axes3D.view_init() got an unexpected keyword argument ‘roll‘——版本问题

解决办法 删除roll关键字参数。 掉坑过程 今天在学习matplotlib绘制3D图形时,使用的是matplotlib官网提供的例子Plot 2D data on 3D plot 敲好代码后,运行时报错TypeError: Axes3D.view_init() got an unexpected keyword argument ‘roll’ 看来官网的代码也不是全部可信的啊 爬坑过