473,699 Members | 2,417 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

gnuplot on Canvas widget

Hey,

I have used two great models - Tkinter and Gnuplot.py - for a while. I
can display an image on a Canvas widget using Tkinter and I can also
generate a gnuplot from Python on the fly in a separate window. Does
anyone know how to display such a gnuplot on the Canvas widget with an
image in it? Thanks.

Michael

Jul 18 '05 #1
3 2805
Blues wrote:
I have used two great models - Tkinter and Gnuplot.py - for a while. I can display an image on a Canvas widget using Tkinter and I can also
generate a gnuplot from Python on the fly in a separate window. Does
anyone know how to display such a gnuplot on the Canvas widget with an image in it? Thanks. From my experience, the Gnuplot module isn't designed to be used in

"headless" mode -- it can save to the usual formats, but you have to
render everything in an x11 window interactively first.
It might not be hard to modify this, though.

-Jonathan

Jul 18 '05 #2
Thanks, Jonathan. Can you please give a little more information here?

Jul 18 '05 #3
Jonathan Ellis wrote:
Blues wrote:
I have used two great models - Tkinter and Gnuplot.py - for a while.

I
can display an image on a Canvas widget using Tkinter and I can also
generate a gnuplot from Python on the fly in a separate window. Does
anyone know how to display such a gnuplot on the Canvas widget with

an
image in it? Thanks.

From my experience, the Gnuplot module isn't designed to be used in

"headless" mode -- it can save to the usual formats, but you have to
render everything in an x11 window interactively first.
It might not be hard to modify this, though.


That's not correct. I have tons of Gnuplot.py based scripts which write
directly to EPS output, without ever opening a gui window. Note that Gnuplot
still tries to initialize the X11 terminal at startup, so they would require
modifications to run over ssh without X forwarding.

The default plot() command in Gnuplot.py doesn't make it too convenient to do
this, but it's possible. The Gnuplot support in ipython
(http://ipython.scipy.org) extends the syntax of the plot() command to make
it trivial to render to EPS without a terminal. It shouldn't be hard to
modify this to render to other formats, while avoiding opening an X11 window.

Best,

f

Jul 18 '05 #4

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

Similar topics

0
2204
by: Mickel Grönroos | last post by:
Hi, I'm trying to put an Tkinter.Entry of fixed size onto a specific location on a canvas using the place manager. The idea is that one can double-click a rectangle object on a canvas to get an entry field of the same size as the rectangle placed exactly over the rectangle thus creating the effect that the rectangle has entered "input mode". When clicking return in the entry field, the value is fed back to a text object within the...
6
11267
by: Gary Richardson | last post by:
Is there a simple way of causing the size of a canvas to change as the window is resized when using the Grid geometry manager? Setting sticky='NESW', as in the following code, doesn't work though the documentation for Grid seems to imply that it should: "sticky If a slave's cell is larger than its requested dimensions, this option may be used to position (or stretch) the slave within its cell. ... The sticky option subsumes the...
3
2374
by: Matthias | last post by:
Hello, I have a Canvas-Widget and will use as a "array of pixel". At Positon x,y I print a rectangle with a special color. I give the rectangle no objectname. Then I will ask the "root-Canvas-Widget" for the color in position x,y like: color=cw.cget('bg',x,y) I need HELP :))
2
3595
by: Askari | last post by:
Hi, I do a "perso"widget where have two scrolls (one vertical, one horizontal) for a canvas. When, the first time, I added widget in the canvas, the scroll self-ajust and when I move scrollbar, the surface's canvas "moved". But when I deleted (.destroy) this first widgets and that a added other widget, the scrollBar become disabled (ajust for no scroll on the canvas). What/where is the problem?
4
4761
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
0
1123
by: John McMonagle | last post by:
I tried binding mouse wheel events (<Button-4>, <Button-5>) to a Tkinter Canvas widget with the hope of using the event.delta value to subsequently scroll the Canvas. However, it seems that event.delta always returns 0. For example, from Tkinter import *
0
2487
by: WaterWalk | last post by:
Hello. When I tried to make Tkinter canvas widget respond to MouseWheel event on Windows XP, I failed. The canvas just doesn't receive MouseWheel event. I used bind_all to find out which widget receives this event and the result showed that only the top Tk widget gets it. This is really annoying. I wonder if this problem exists on other platform. I googled, but found no appliable solution, so I wrote one as following. It's not perfect,...
6
3547
by: Nebulism | last post by:
I have been attempting to utilize a draw command script that loads a canvas, and through certain mouse events, draws rectangles. The original code is from http://www.java2s.com/Code/Python/Event/Usemousetodrawashapeoncanvas.htm . The code itself is: from Tkinter import * trace = 0 class CanvasEventsDemo: def __init__(self, parent=None): canvas = Canvas(width=300, height=300, bg='beige') canvas.pack()
1
2212
by: Shankartalukdar | last post by:
Dear all, I am currently drawing a visualization tool in python using Tkinter. I would like to know how to add scroll bars into the canvas widget using the Tkinter module.Could you kindly send me a sample code from the beginning to the end showing how to use scroll bars in the canvas widget.Thank You Regards, Shankar
0
8613
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,...
1
8908
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7745
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...
1
6532
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4374
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
4626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3054
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
2008
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.