Re: XY plotting tool in TCL/TK
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: XY plotting tool in TCL/TK

From: Eckhard Lehmann <ecky-l@web.de>
Date: Fri Oct 28 2005 - 20:58:14 CEST

Juan C. Gil schrieb:
> Eackard,
>
> This looks interesting. Can you comment on how Tkcanvplot compares
> with BLT's graph and stripchart? One obvious difference is that BLT
> provides widgets, while your graphs appear to be Tk canvas elements.
>
> Juan Carlos---
>

Much of the code is based on ideas from Tkgraph, which seems to be no
longer maintained (at least it was difficult to find a working link),
and works only on Linux - maybe other Unices.

Yes, the graphs and viewports are canvas elements. So it is easy to add
descriptions, legends and other elements. It is also possible to put
more than one viewport on a canvas and this way to display e.g. two
similar graphs in the same x range and different y ranges. The fade
cross can be configured to cover all viewports on the canvas.

This was important for me, as well as the ability to plot huge amounts
of XY data, zooming and scrolling. I tried BLT once, but drawing 150000
data points was impossible - the same experience of course with pure Tcl
plot implementations. I switched to Plplot, which is a very good
plotting library. But Plplot has two big problems for me: only 16 colors
and not really good working zooming functionality. It is possible to
zoom, but then *everything* in the plot window gets zoomed: plot labels,
axis labels... looks very strange.
Since I need only a very small part of plplots functionality (which is
just drawing of XY data, no shapes, no 3D plots, no heat maps or world
maps...), I decided to start developing Tkcanvplot for just this
purpose: drawing big amounts of XY data as lines/bars/scatters in many
colors plus zooming, scrolling and smooth integration in the Tk
landscape. This is what Tkcanvplot aims to be.

I experienced no bugs so far, except that it is not always possible to
configure the tickintervals for the viewport (-xmajortick, -xminortick,
-ymajortick, -yminortick) - no time to trace it back yet. At creation
time of the viewport it is always possible. There might be some more
bugs, the extension needs more testing.

If you have more questions, you're welcome to ask :-).

Eckhard
Received on Mon Nov 21 00:36:48 2005