471,338 Members | 1,342 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,338 software developers and data experts.

python with gnuplot

I want help on using python with gnuplot on windows platform. If somebody could help me I will be very happy
Oct 10 '07 #1
16 10598
bartonc
6,596 Expert 4TB
I want help on using python with gnuplot on windows platform. If somebody could help me I will be very happy
We can help. What have you got so far?
Oct 10 '07 #2
I would like to know how I can you gnuplot with python on windows platform. I am getting some errors while installing gnuplot.py
Oct 11 '07 #3
bartonc
6,596 Expert 4TB
I would like to know how I can you gnuplot with python on windows platform. I am getting some errors while installing gnuplot.py
We can help with that. You must provide specifics regarding your difficulty in order for us to know how to help.

Thanks.
Oct 11 '07 #4
I too am having a trouble getting GnuPlot to work with python. I have vista and have installed Numpy and GnuPlot. I have placed the gnuplot.py in the site packages folder along with GnuPlot and Numpy. When I try and run the gnuplot.py demo it says that there is no module Numeric. I found some help site that said that if Numpy is installed correctly you should be able to import Numeric.

Is there anything else you need to know?
Oct 22 '07 #5
bartonc
6,596 Expert 4TB
I too am having a trouble getting GnuPlot to work with python. I have vista and have installed Numpy and GnuPlot. I have placed the gnuplot.py in the site packages folder along with GnuPlot and Numpy. When I try and run the gnuplot.py demo it says that there is no module Numeric. I found some help site that said that if Numpy is installed correctly you should be able to import Numeric.

Is there anything else you need to know?
A test of your NumPy installation would be:
Expand|Select|Wrap|Line Numbers
  1. >>> from numpy import oldnumeric
I know that I have Numeric and NumPy both installed on my system so that I never run into this problem. You can get Numeric on SourceForge.
SciPy has also proven to be invaluable.

I should also ask which OS you are on as there could be installation issues that we can look at in that light.
Oct 22 '07 #6
A test of your NumPy installation would be:
Expand|Select|Wrap|Line Numbers
  1. >>> from numpy import oldnumeric
This test worked.

I know that I have Numeric and NumPy both installed on my system so that I never run into this problem. You can get Numeric on SourceForge.
SciPy has also proven to be invaluable.

I should also ask which OS you are on as there could be installation issues that we can look at in that light.
I have Vista and Python 2.5 installed, which when I tried to install Numeric it says it needs 2.4 to work and I couldn't find a version that worked with 2.5
Oct 22 '07 #7
bartonc
6,596 Expert 4TB
I have Vista and Python 2.5 installed, which when I tried to install Numeric it says it needs 2.4 to work and I couldn't find a version that worked with 2.5
Yep. That's why I asked.

Current officially released version is gnuplot 4.2.2
(released on September 1, 2007).
But # Gnuplot.py version 1.7 released 2003-10-19

My connection's the pits at the moment. I'll check out that for you. You may also want to check out matplotlib.
Oct 22 '07 #8
Yep. That's why I asked.

Current officially released version is gnuplot 4.2.2
(released on September 1, 2007).
But # Gnuplot.py version 1.7 released 2003-10-19

My connection's the pits at the moment. I'll check out that for you. You may also want to check out matplotlib.
yeah i have those two versions.
also, i tried using that code they have with numpy to update from numeric but that didn't seem to work, but I doubt i was using it correctly.
Oct 22 '07 #9
bartonc
6,596 Expert 4TB
A test of your NumPy installation would be:
Expand|Select|Wrap|Line Numbers
  1. >>> from numpy import oldnumeric
I know that I have Numeric and NumPy both installed on my system so that I never run into this problem. You can get Numeric on SourceForge.
SciPy has also proven to be invaluable.

I should also ask which OS you are on as there could be installation issues that we can look at in that light.
I haven't had a chance to try this yet, but wanted to see some progress. Have you tried modifying the source code of the gnuplot library thusly:
Expand|Select|Wrap|Line Numbers
  1. >>> from numpy import oldnumeric as Numeric
Numeric may be imported in more that one place it the package, so I may need to come up with a better fix (like creating a new init.py for the package).
Oct 24 '07 #10
bartonc
6,596 Expert 4TB
I haven't had a chance to try this yet, but wanted to see some progress. Have you tried modifying the source code of the gnuplot library thusly:
Expand|Select|Wrap|Line Numbers
  1. >>> from numpy import oldnumeric as Numeric
Numeric may be imported in more that one place it the package, so I may need to come up with a better fix (like creating a new init.py for the package).
I just found some interesting links for you:Numericix for starters.
Oct 28 '07 #11
I just found some interesting links for you:Numericix for starters.

I looked at that site but was confused as to what I am supposed to be looking for.

also I tried the above fix and this message then popped up and confused me even more.

>>> C:\Program Files\Python25\Lib\site-packages\gnuplot-py-1.7\demo.py:50: Warning: 'with' will become a reserved keyword in Python 2.6
Traceback (most recent call last):
File "C:\Program Files\Python25\Lib\site-packages\gnuplot-py-1.7\demo.py", line 22, in <module>
import Gnuplot, Gnuplot.funcutils
ImportError: No module named Gnuplot
>>>
Oct 28 '07 #12
bartonc
6,596 Expert 4TB
I looked at that site but was confused as to what I am supposed to be looking for.

also I tried the above fix and this message then popped up and confused me even more.

>>> C:\Program Files\Python25\Lib\site-packages\gnuplot-py-1.7\demo.py:50: Warning: 'with' will become a reserved keyword in Python 2.6
Traceback (most recent call last):
File "C:\Program Files\Python25\Lib\site-packages\gnuplot-py-1.7\demo.py", line 22, in <module>
import Gnuplot, Gnuplot.funcutils
ImportError: No module named Gnuplot
>>>
The best solution that I have at the moment is that you install Python 2.4.4 (I have both that and 2.5 installed on system and use 2.4 for just this type of scenario).
Oct 28 '07 #13
alright, well thank you for your help
Nov 8 '07 #14
bartonc
6,596 Expert 4TB
alright, well thank you for your help
I think that I've found the answer to this.
In modules that depend on numeric, change the line
Expand|Select|Wrap|Line Numbers
  1. import numeric
to
Expand|Select|Wrap|Line Numbers
  1. from numpy.core import numeric
Nov 12 '07 #15
bartonc
6,596 Expert 4TB
This seems to work well and doesn't require original source code mods:

In your site-packages directory, create a file called "Numeric.py" (remember that python IS case sensitive). Two lines in that file should be all it takes to allow importers of the Numeric package to function properly:
Expand|Select|Wrap|Line Numbers
  1. from numpy import oldnumeric
  2. globals().update(oldnumeric.__dict__)
To test this I used
Expand|Select|Wrap|Line Numbers
  1. import Numeric
  2. help(Numeric)
Mar 13 '10 #16
Glenton
391 Expert 256MB
Hi

The chances are that this is not to do with your numpy installation, but your environmental variables.

I'm afraid that I don't use windows anymore, but I remember there's a readme file in gnuplot.py that gives step-by-step for the set up, which involves fiddling with environmental variables and perhaps something else.

Apologies for the vagueness of the response. It's been a couple of years!
Mar 14 '10 #17

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

13 posts views Thread by Tim Henderson | last post: by
22 posts views Thread by Kenneth Miller | last post: by
reply views Thread by bwaha | last post: by
8 posts views Thread by Paul Cochrane | last post: by
7 posts views Thread by diffuser78 | last post: by
reply views Thread by Santix | last post: by
reply views Thread by matthew43 | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.