matplotlib.use(‘agg’)的作用是绘图不显示
作用:是控制绘图不显示
在导入matplotlib库后,且在matplotlib.pyplot库被导入前加“matplotlib.use(‘agg’)”语句。
注意matplotlib.use('agg')必须在本句执行import matplotlib.pyplot as plt前运行
作用:是控制绘图不显示
在导入matplotlib库后,且在matplotlib.pyplot库被导入前加“matplotlib.use(‘agg’)”语句。
注意matplotlib.use('agg')必须在本句执行import matplotlib.pyplot as plt前运行