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: <ecky-l@web.de>
Date: Fri Oct 28 2005 - 13:20:16 CEST

Joe schrieb:

> Folks,
>
> I would like to know if there is any tool available which I would like
> to use for plotting the XY data through programatically.
>
> I know that TCL/TK has some plotting routines but it doesnt contain
> some rich features. I am looking for a more standard tool written in
> TCL/TK that I can use directly.
>

I created a small plotting library, called "Tkcanvplot". It's hosted on
sourceforge: http://sourceforge.net/projects/tkcanvplot. Tkcanvplot
creates a coordinate system and one or several XY data traces on a Tk
canvas. It is possible to plot lines, and it will soon be possible to
plot bars and scatter graphs as well. The project is suited for small
and very big datasets, as the plotting is done on C level (my
applications of it need to plot around 150000-200000 data points at
minimum).
More features include zooming, scrolling in zoomed plots, axisline
labeling, determination of plot coordinates...

It is my pet project and I do it in my spare time - that is the reason
why there are no file releases yet. However, Tkcanvplot is close to
1.0, the only problem is, that documentation is still missing. As soon
as I have found enough time to write a small manpage, I will release
the 1.0 and create one or two HTML pages for
http://tkcanvplot.sourceforge.net/.
Until then, you can checkout the sources from CVS (instructions at:
http://sourceforge.net/cvs/?group_id=148464).

A short usage example:
-------
      package require Tk
      package require Tkcanvplot

      canvas .c -width 400 -height 600
      set vp [.c create viewport 0 0 400 600 -fill white -xaxismin 0 \
            -xaxismax 100 -yaxismin 0 -yaxismax 100]

      set data {0 0 1 1 2 2 3 3 4 4 50 60 70 80 90 100}
      .c create trace $data -fill red -viewport $vp
      
      pack .c -expand yes -fill both
-------

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