To solve this you must specific other backend that not required GUI (Agg, Cairo, PS, PDF or SVG) when use matplotlib like this
- In code
import matplotlib
matplotlib.use('Agg')
- In command line use -d option
Remember when call savefig('filename') don't give it extension this will handle by backend that you specific e.g Agg will create file filename.png
source from --> http://matplotlib.sourceforge.net/backends.html
No comments:
Post a Comment