I've read these and tried the solutions but still not getting anything to show:
matplotlib show nothing although i called show
Why doesn't pyplot.show() work? [duplicate]
matplotlib does not show my drawings although I call pyplot.show()
I'm using Python 2.7.6 |Anaconda 1.9.0 (64-bit) on Ubuntu 12.04. How can I go about diagnosing the problem and trying to solve it?
EDIT:
-First I edited matplotlibrc and change the backend to GtkAgg (was set to QtAgg).
-Then I tried to change the backend via code: matplotlib.rcParams['backend'] = "GtkAgg"
EDIT2 - adding detail from the Spyder console (no plot is shown at the end):
Python 2.7.6 |Anaconda 1.9.0 (64-bit)| (default, Jan 17 2014, 10:13:17)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Imported NumPy 1.8.0, SciPy 0.13.3, Matplotlib 1.3.1
Type "scientific" for more details.
>>> scientific
This is a standard Python interpreter with preloaded tools for scientific
computing and visualization. It tries to import the following modules:
>>> import numpy as np # NumPy (multidimensional arrays, linear algebra, ...)
>>> import scipy as sp # SciPy (signal and image processing library)
>>> import matplotlib as mpl # Matplotlib (2D/3D plotting library)
>>> import matplotlib.pyplot as plt # Matplotlib's pyplot: MATLAB-like syntax
>>> from pylab import * # Matplotlib's pylab interface
>>> ion() # Turned on Matplotlib's interactive mode
Within Spyder, this interpreter also provides:
* special commands (e.g. %ls, %pwd, %clear)
* system commands, i.e. all commands starting with '!' are subprocessed
(e.g. !dir on Windows or !ls on Linux, and so on)
>>> plot(range(3))
[<matplotlib.lines.Line2D object at 0x3f3cd50>]
>>> show()