473,397 Members | 2,077 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Re: Do a Gnuplot of a file in python


Thanks a lot because it works with
g.load("power.p")

But now I have this problem

gnuplotload 'power.p'
gnuplotset terminal postscript enhanced color
gnuplotset output "spectrum.ps"
gnuplotplot
gnuplotset terminal x11
gnuplotset output

gnuplotplot
^
line 0: function to plot expected

It plots one time and then I want the program to close the plot window and
do another iteration, then show a plot again, close it, another iteration,
etc...
What should I put in the "power.p" code? I've tried to put exit or close but
it doesn't close the plot window.

Thanks and Regards,

Santi.

Gabriel Genellina-7 wrote:

En Thu, 23 Oct 2008 13:58:20 -0200, Santix <sa*************@gmail.com
escribió:
>I am doing a python program that save the data in a text file in columns
and
I want to do a gnuplot to plot the results.
But I want the program in python to show the result with gnuplot.
I have tried this:

g.load(power.p)

but it gives me this error:

Traceback (most recent call last):
File "./spectrum_output.py", line 310, in <module>
main_loop(tb)
File "./spectrum_output.py", line 289, in main_loop
g.load(power.p)
AttributeError: 'file' object has no attribute 'p'
I don't know gnuplot nor what g.load expects - but probably some lines
above that you have something like this:
power = open(...)
Try with g.load("power.p") instead.

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list
--
View this message in context: http://www.nabble.com/Do-a-Gnuplot-o...p20191843.html
Sent from the Python - python-list mailing list archive at Nabble.com.

Oct 27 '08 #1
0 1164

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Richard | last post by:
I am going to need to plot some data and formula results from Python. A few years ago I used gnuplot (not from Python) and was wondering which Python plotting module I should use (learn)? I...
4
by: Rama Calaga | last post by:
Hi, I use both python and gnuplot a lot, but I am unable to find a way to embed gnuplot "window/canvas" into tkinter. BLT option in PMW is not so powerful and not so great, any suggestions ?? ...
7
by: Jive | last post by:
Here's my sitch: I use gnuplot.py at work, platform Win32. I want to upgrade to Python 2.4. Gnuplot.py uses extension module Numeric. Numeric is now "unsupported." The documentation says "If...
0
by: Cedric | last post by:
This is a 3 weeks old problem, but having found a solution (and having looked for one here, finding only this message), I'm replying now. From: Jive (someone@microsoft.com) Subject: Upgrade...
9
by: syd | last post by:
I don't even know where to begin. This is just bizarre. I just picked up the Gnuplot.py module (a light interface to gnuplot commands) and was messing around with it today. I've got a tiny...
1
by: Nicola Kaiser | last post by:
Hi, I´m using Gnuplot via gnuplot.py and I´m looking for a way to get the plotting output (terminal set to png in my case) piped in a string instead of to stdout or a file. Is there any...
0
by: bwaha | last post by:
I've posted this question to comp.graphics.apps.gnuplot too but given that this python group may also comprise a lot of gnuplot users, and is far more active, I've posted this question here too. My...
3
by: arslanburney | last post by:
Hello. Was trying to create a simple plotting function. Wasnt working however. If i write the same code without putting it inside a function it works. :S. Could some1 tell me the problem? Heres the...
0
by: Santix | last post by:
I am doing a python program that save the data in a text file in columns and I want to do a gnuplot to plot the results. But I want the program in python to show the result with gnuplot. I have...
0
by: matthew43 | last post by:
You might want to try g.reset() or something of the sort. i saw this post because I'm also trying to figure out gnuplot.py I can't seem to find proper documentation anywhere. unless its...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.