matplotlib常用函数介绍及使用_ax1.clear()类函数-CSDN博客

网站介绍:文章浏览阅读2.7k次,点赞8次,收藏19次。matplotlib常用函数介绍1、模块:from matplotlib import animationfrom matplotlib import pyplotfrom pylab import mplfrom matplotlib import ticker2、创建子图,定义 fig, axfig,ax=plt.subplots()# # 创建一个子图,返回一个包含figure和axes对象的元组,将元组分解为fig和ax两个变量3、创建2维直线图chart.._ax1.clear()类函数