Problem Cause
In mac os image rendering back end of matplotlib (what-is-a-backend to render using the API of Cocoa by default). There are Qt4Agg and GTKAgg and as a back-end is not the default. Set the back end of macosx that is differ compare with other windows or linux os.
Solution
- I assume you have installed the pip matplotlib, there is a directory in your root called
~/.matplotlib
.
- Create a file
~/.matplotlib/matplotlibrc
there and add the following code: backend: TkAgg
From this link you can try different diagrams.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…