Forums

Matplotlib error

How can I use matplotlib on this site. I tried on console to import matplotlib, but not working.

I was trying to use import matplotlib.pyplot as plt

We're working on it. There's a workaround here: https://www.pythonanywhere.com/forums/topic/1297/

You need to specify the backend at the moment. We're working on a fix.

Python 2.7.5+ (default, Feb 27 2014, 19:37:08)
[GCC 4.8.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
>>> matplotlib.use("agg")
>>> from pylab import *
>>>