0

I have a problem with python 3.2.3 and Gnuplot. I have installed gnuplot-4.6.1, it's going well with defaults demo, but an error occurs when i want to import the module in the python environnement.

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named Gnuplot

I don't know what's wrong with python3

ps: before gnuplot-4.6.1, i had gnuplot1.8 and i used it for plot

KKc
  • 324
  • 1
  • 5
  • 16

1 Answers1

3

I assume you need to install Gnuplot-py for your version of python.

Since Gnuplot-py doesn't seem to be actively supported much these days, I'm not sure if it will work on python3.x or not (You'll need to try it and see).

Another option is pyGnuplot which I develop and I aim to keep it py3k compatable (although I don't test that very often). It is not a drop in replacement for Gnuplot-py however, so you'd need to change your code in order to use it.

Finally, (probably the most popular option these days) is matplotlib. My impression is that it gives an interface which is designed to make people familiar with MATLAB a little more comfortable and it is pretty powerful. I know a lot of people are very happy with it.

mgilson
  • 300,191
  • 65
  • 633
  • 696
  • 1
    i am going to try `matplotlib` and i will give you a feedback. Previously, when i said Gnulot-4.6.1 or the other version, i wanted to say Gnuplo.py version 4.6.1 [http://gnuplot-py.sourceforge.net/] – KKc Oct 11 '12 at 16:00
  • `matplotlib` is not supported by python3, but it exist a solution that builds from github[http://stackoverflow.com/questions/8605847/how-to-install-matplotlib-with-python3-2], i'm trying – KKc Oct 12 '12 at 11:35
  • 1
    This port of gnuplot-py to python 3 appears to work: https://github.com/PavelTrutman/gnuplot.py-py3k – Traveler Oct 26 '19 at 17:21