Reputation: 15084
As of late, I can't get my Matplotlib plots to show up. I have a very simple script:
import matplotlib.pyplot as plt
plt.plot([1,2,3])
but nothing ever shows up. If I include the line
plt.show()
then my Python process hangs.
In my ~/.config/matplotlib/matplotlibrc
file I have
backend : MacOSX
interactive : True
I'm a little embarrassed to ask this question. I've been a Matplotlib user for many years and have never had this problem. I don't know where to begin to fix this problem. Help!
I'm using Matplotlib 2.0.0 with Python 3.5.2 from Anaconda.
Upvotes: 3
Views: 7360
Reputation: 21
I've just remove the line
interactive: True
enter code here
from my ~/matplotlib/matplotlibrc
. It works fine with only backend: MacOSX
using the plt.show()
command.
Upvotes: 2
Reputation: 15084
The answer, as pointed out by @ImportanceOfBeingErnest is that the backend configuration for me wasn't working. I'm not sure if I need to install some additional libraries or not. I decided not to use the MacOSX
backend and used the Qt5Agg
backend. This worked just fine and I didn't have to install any new libraries.
Upvotes: 7