To fix this problem, I added to the top:
import matplotlib
matplotlib.use('Agg')
I have a CentOS7, Anaconda3-4.5.0, python3.5
pyqt version 5.6.0 and qt version 5.6.0
If you want to use the plot in a Tkinter window for visualisation then use:
matplotlib.use('TkAgg')
More Related Contents:
- How to make IPython notebook matplotlib plot inline
- How can I set the ‘backend’ in matplotlib in Python?
- Purpose of “%matplotlib inline”
- Installation Issue with matplotlib Python [duplicate]
- Matplotlib and Ipython-notebook: Displaying exactly the figure that will be saved
- Scrollbar on Matplotlib showing page
- How to dynamically update a plot in a loop in IPython notebook (within one cell)
- Installing a pip package from within a Jupyter Notebook not working
- How to hide in IPython notebook
- Use the default Python rather than the Anaconda installation when called from the terminal
- What is %pylab?
- How to show a bar and line graph on the same plot
- How do I get interactive plots again in Spyder/IPython/matplotlib?
- After Anaconda installation, conda command fails with “ImportError: no module named conda.cli”
- Show matplotlib plots (and other GUI) in Ubuntu (WSL1 & WSL2)
- Packages from Conda env not found in Jupyer Notebook
- Display an image with Python
- My plot in ipython does not show with pyplot.show()
- How can I set the matplotlib ‘backend’?
- How to move .conda from one folder to another at the moment of creating the environment
- Matplotlib scatterplot; color as a function of a third variable
- Why does multiprocessing use only a single core after I import numpy?
- How to make a 4d plot with matplotlib using arbitrary data
- Matplotlib – Move X-Axis label downwards, but not X-Axis Ticks
- How to set xticks in subplots
- X-axis tick labels are too dense when drawing plots with matplotlib
- Make tick labels font size smaller
- How to maximize a plt.show() window
- How to display a 3D plot of a 3D array isosurface with mplot3D or similar
- How to set a single, main title above all the subplots