Embedding Gnuplot window into a Tk Application

Embedding Gnuplot window into a Tk Application

Post by Rob Ratclif » Fri, 09 Nov 2001 03:57:17



Does anybody have a patch available for Gnuplot to allow it to be
embedded into
a Tk application as a fully functioning widget (including resize)? I
remember seeing
one a few years ago, but haven't found it again. I've seen TkSteal and
other X window
specific approaches but I'd like a solution similar to what ToGL
provides for openGL applications.
I wouldn't even mind having to pipe gnuplot commands  to gnuplot in an
external process
as long as the window appeared like it was just another Tk widget.

Thanks,

Rob

 
 
 

Embedding Gnuplot window into a Tk Application

Post by Hans-Bernhard Broeke » Fri, 09 Nov 2001 20:04:04



> Does anybody have a patch available for Gnuplot to allow it to be
> embedded into
> a Tk application as a fully functioning widget (including resize)?

There's a special-purpose terminal driver for that purpose: "set term
tkcanvas".  It don't know much about its workings, but it may be
exactly what you're looking for.

--

Even if all the snow were burnt, ashes would remain.

 
 
 

Embedding Gnuplot window into a Tk Application

Post by Rob Ratclif » Sat, 10 Nov 2001 02:15:10


I've looked at the tkCanvas approach. It emits Tk Canvas commands
which can be quite slow to render for plots with lots of data. Ideally
the Gnuplot window would be embedded directly into the Tk application
so that I still have access to all the speed and capabilities of the
original application
not just "snapshots" of the plot.


> > Does anybody have a patch available for Gnuplot to allow it to be
> > embedded into
> > a Tk application as a fully functioning widget (including resize)?

> There's a special-purpose terminal driver for that purpose: "set term
> tkcanvas".  It don't know much about its workings, but it may be
> exactly what you're looking for.

> --

> Even if all the snow were burnt, ashes would remain.

 
 
 

1. Resizing an OpenGL window in a perl/tk application

Hi there,
Hi Stan,

I have a problem resizing a OpenGL-window inside a perl/tk application.

I am programming a GUI interface using perl 5.004.01 with the packages
perl/tk 402.002 and OpenGl 0.4. The system I am using is a Sun Ultra1
with OpenWindows 3.5 (X11R5).
Also, I have not much experience with all these packages and I am no perl e=
xpert.

The OpenGL-window is a children of a frame I create with the following line=
s:

$main::graphics_frame=3D $top_win->Frame( -width=3D> 200, -height=3D> 200,
                                        -relief=3D> 'raised', -bg=3D> 'gree=
n');
$main::graphics_frame->pack(-side=3D> 'top', -expand=3D> 1, -fill=3D> 'both=
');

The OpenGL windows is created by the following lines:

$id=3D $main::graphics_frame->WindowId;
glpOpenWindow(width=3D>200, height=3D>200, parent=3D>$$id,
              attributes=3D>[GLX_RGBA, GLX_DOUBLEBUFFER, GLX_DEPTH_SIZE,1])=
;

If the main window is resized the frame changed its size but the
opengl window is not resized.

Is this a feature not implemented yet or do I something wrong?

I've no experience with Xlib but I think it may be possible to return
the opengl window id by glpOpenWindow. Afterwards I may use
XResizeWindow to change the opengl window size. Is it a possibility or
exists other solutions?

Best regards

Uwe.

--
----------------------------------------------------------------
Uwe Dirksen, Stud. der Informatik, Universit=E4t Dortmund, Germany

PGP Key fingerprint =3D D6 7C 44 69 02 29 71 B4  80 93 1E C5 AA 28 73 3E

2. MY FLASH TRAILER

3. Windows application embedded animation, with design tool.

4. Cosmo JPEG card

5. Embedding Gnuplot window in another program.

6. How to open a PC PageMaker file on a Mac

7. Using gnuplot from another X-windows application

8. YOU NEED NOT EXPENSIVE WAREZ!!!

9. Gnuplot/Tk

10. Calling Gnuplot from Tcl/Tk

11. Gnuplot+Perl/Tk article on the web

12. gnuplot and Tcl/Tk

13. newbie question (c++ embedded gnuplot call)