0

Knowing that this is a question, 100times asked, but no solution helps me.

Trying to make a simple plot:

import matplotlib.pyplot as p 
p.plot(range(20), range(20))
p.show()

I used several backends in ~/.matplotlib/matplotlibrc, such as GTK, GTKAgg, Qt4Agg, gdk, agg, svg, kairo,...), by adding the line

backend: <backend>

But nothing happens when I try to plot. No error message, simply nothing. I used both the standard console python2.7 and the IPython console.

I'm using CentOS with Gnome Desktop. Matplotlib is 1.2.0.

Do you have any ideas?

NOTE: I realized that it is a problem only as non-root user.

John Rumpel
  • 4,535
  • 5
  • 34
  • 48
  • Works for me, matplotlib 1.20 on Ubuntu. I don't have a file `.matplotlibrc` though (i.e. it's empty) – YXD Feb 21 '13 at 10:51
  • By the way import Tkinter; Tkinter.Tk() works fine for me. No problem with that package. This is really sxxx :( – John Rumpel Feb 21 '13 at 11:03
  • do `dir(p)` and `help(p.plot)` work? – Junuxx Feb 21 '13 at 11:50
  • Both works fine, and as I am realizing at this moment. Its a security problem. I cannot plot as normal user but need root rights? Is this, because I compiled matplotlib as root? How to handle that? – John Rumpel Feb 21 '13 at 12:55
  • that shouldn't be a problem. I've used matplotlib installed by myself on ~/.local/... and the one shipped with Ubuntu without problems – Francesco Montesano Feb 21 '13 at 13:24
  • How did you install mpl? See http://stackoverflow.com/questions/14803044/matplotlib-animation-moviewriters-fails-on-ubuntu-12-04/14806555#14806555 and http://stackoverflow.com/questions/11863775/python-scipy-install-on-ubuntu/11864996#11864996 for two ways to install `matplotlib` as non-root. – tacaswell Feb 21 '13 at 15:37
  • Well, I have the same symptoms since installing matplotlib 1.2.0, except root doesn't see any drawings/figures/plots either ): I'm guessing I've a dependency problem, but havn't worked out what's missing yet... – drevicko Feb 24 '13 at 02:21

0 Answers0