473,772 Members | 3,603 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.p s"
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 1198

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

Similar topics

6
2662
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 have seen DISLIN mentioned on "onlamp.com" and see that gnuplot has a python module wrapper. Any suggestions on Python plotting modules? (DISLIN or gnuplot.py or ????) Thanks
4
4775
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 ?? thanks ram
7
3009
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 you are new to Numerical Python, please use Numarray.". It's not that easy, dangit. The download page for numpy does not contain a 2.4 version of Numeric, and I suspect they do not intend to release one, because there IS a 2.4 version of...
0
1528
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 woes: Numeric, gnuplot, and Python 2.4 Date: 2004-12-11 18:45:10 PST > Here's my sitch: > > I use gnuplot.py at work, platform Win32. > I want to upgrade to Python 2.4.
9
4713
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 script, but it only works from the command line about half the time! In the python interpreter, 100%. Ipython, 100%. I'm not kidding. #!/bin/env python import Gnuplot
1
3364
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 method in gnuplot.py that does this for me? If not, I tried something like:
0
1854
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 apologies to those who read this twice. I posted to cgag before I decided to post here with a more meaningful subject. Anyone had any success getting stdout from gnuplot on an ms windows system (XP)? I'm trying to read mouse coordinates...
3
6197
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 code: # File name Plotting2 import Gnuplot def plot(original, expected, actual):
0
1217
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 tried this: g.load(power.p) but it gives me this error: Traceback (most recent call last):
0
1712
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 telling me to run "demo.py" and analyse the code. does any1 have any idea where else I could look? A comprehensive tutorial/online documentation would be ideal
0
9620
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10261
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10104
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8934
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.