Questions tagged [matplotlib]

matplotlib is a plotting library for the Python programming language

57 questions
12
votes
4 answers

No module named 'numpy'

Actually I am shifting from Windows to Linux. Using pycharm on Windows I have a python 3 script that requires numpy and matplotlib to run, so I installed them on my Linux system using sudo apt-get install python3-numpy sudo apt-get install…
rjbir
  • 123
12
votes
3 answers

What is a good, default backend for matplotlib

I've decided to setup a custom matplotlibrc, and thus I need to pick a backend for matplotlib. What is the best one in terms of not needing to install other additional packages? I tend to use matplotlib via ipython --pylab, so I want interactive…
Dave
  • 402
  • 1
  • 4
  • 18
8
votes
1 answer

"Matplotlib is currently using agg, which is non-GUI backend, so cannot show the figure." error when trying to plot with Matplotlib on Ubuntu 20.04

I'm using Ubuntu 20.04 LTS. I've recently installed Matplotlib for Python 3.9 and when I try to plot a graph it gives me the error: Matplotlib is currently using agg, which is non-GUI backend, so cannot show the figure. Do I have to install…
Unnamed
  • 353
7
votes
1 answer

Backend for python3 module matplotlib

I'm trying to use python3 to plot graphs. The only back-end for matplotlib that seems to work is tkAgg (Tkinter), however this looks like it has been designed in the Stone Age. So I was trying to find a replacement. As I'm using Unity which is…
Minos
  • 1,821
7
votes
2 answers

Most up to date Ipython and Matplotlib in Ubuntu 13.10

I've recently updated my Ubuntu to the 13.10 version. To my surprise, Ipython and Matplotlib are available only in versions prior to those I had in my previous 12.04 LTS install. When with the 12.04, I had the Julian Taylor PPA set up in my…
5
votes
3 answers

matplotlib not working in Pycharm 4.5.3

I'm trying to run a simple code in Pycharm Community Edition 4.5.3 to display a graph with some points using matplotlib import matplotlib.pyplot as…
4
votes
1 answer

How to ensure matplotlib in a Python 3 virtualenv uses the TkAgg backend?

I am using Ubuntu 16.04 with Python 3. Using APT to install python3-matplotlib and then printing the matplotlib backend gives TKAgg, which is expected because Ubuntu has 16.04 has python3-tk installed. This is done by running: sudo apt install…
edwinksl
  • 24,109
4
votes
1 answer

Plotting with Matplotlib in Python 3 pylab: Tkinter and Qt FontManager errors

I'm trying to use pylab (i.e., $ ipython3 --pylab) in Python 3 on Ubuntu 14.04. I'm running into the same error regardless of whether I use the Tkinter or Qt4 backends. AttributeError: 'FontManager' object has no attribute 'ttf_lookup_cache' This…
Arthur
  • 418
4
votes
3 answers

matplotlib Error: No module named matplotlib even though it is installed

I have been through the process of installing matplotlib on my Ubuntu 12.04 computer. However, when I try to run a test program, I get the following error: Traceback (most recent call last): File "../py33/test.py", line 2, in import…
Clint
  • 45
4
votes
1 answer

Matplotlib plt.show(block=False) opens black window

Matplotlib plt.show(block=False) gives me a black window when plotting something that normally would work with plt.show(block=True). With my previous Ubuntu install I could always run plt.show(block=False) without any issues. Here is a simple piece…
4
votes
2 answers

Python matplotlib - ImportError: No module named functools_lru_cache

I have installed matplotlib for Python using pip which was completed without error. Yet I get this error when I try to import it: import matplotlib Traceback (most recent call last): File "", line 1, in File…
r k
  • 41
3
votes
1 answer

Unable to install matplotlib using pip in Ubuntu 16.04

In Ubuntu 16.04 I am able to install almost every python package and library using pip except for matplotlib. I use this command to install matplotlib pip install matplotlib This gives the error: Command "python setup.py egg_info" failed with…
Divyat
  • 31
3
votes
1 answer

How to install Python Matplotlib 1.5.1 on Ubuntu?

I want to install matplotlib 1.5.1 for python 3.4 on Ubuntu 14.04. But, when I type in the terminal sudo apt-get install python3-matplotlib, I just get matplotlib 1.3.1. I have tried to use pip to install matplotlib, but I got some errors that…
3
votes
0 answers

Really installing PyQt4/5 for python 3.4 on trusty

I am using Python 3 on my ubuntu 14.04.2 (trusty), along with Python 2. I am trying to run ipython --pylab, but with Python 3, this fails (works well with Python 2). It fails since it needs QT4/5 or PySide. I could not install PySide, but I could…
Bach
  • 751
3
votes
1 answer

Ubuntu 14.04 upgrade causes matplotlib error

Since upgrading to 14.04 any python code I run that uses matplotlib returns an error. Here is what my ipython console returns In [1]: import matplotlib.pyplot as…
Sav-econ
  • 195
1
2 3 4