matplot画图中的小知识点

①导入matplotlib模块 import matplotlib 当我们并不想在页面中展示所作的图形,以减少内存时,有以下几种方法: 1)matplotlib.use(‘Agg’) 单用这一行代码,不会报错但会有提示 所以我们要另外再加上一行代码。汇总如下: import matplotlib as mpl mpl.use(‘Agg’) mpl.rc(‘figure’, max_open_war
相关文章
相关标签/搜索