|
執行PYTHON時,出現錯誤
- UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure
複製代碼
或是出現這錯誤訊息
- AttributeError: module 'backend_interagg' has no attribute 'FigureCanvas'. Did you mean: 'FigureCanvasAgg'?
複製代碼
解決方法
- import matplotlib #加入這兩行
- matplotlib.use('TkAgg') #加入這兩行
- import matplotlib.pyplot as plt
複製代碼
Matplotlib agg python
|
|