From: Muhammad Abd El Baset on 28 Dec 2009 07:02 Hello all, I am new with Tcl/tk and I want to build a graph using Tcl/tk. for example if I have some data like the following and I want to explain them graphically: No. of absent students in a class: 5 10 2 7 9 Month : Jan Feb Mar Apr May Thanks in advance, Mohamed
From: Arjen Markus on 28 Dec 2009 07:30 On 28 dec, 13:02, Muhammad Abd El Baset <eng.m.abdelba...(a)gmail.com> wrote: > Hello all, > > I am new with Tcl/tk and I want to build a graph using Tcl/tk. for > example if I have some data like the following and I want to explain > them graphically: > > No. of absent students in a class: 5 10 2 7 9 > Month : Jan Feb Mar Apr > May > > Thanks in advance, > Mohamed There are several possibilities: - BLT is a very good package for this sort of things - Plotchart is a very nice one too (but as the author of that package I am perhaps biased :) You can find BLT as part of the ActiveTcl distribution and Plotchart is part of Tklib, also part of ActiveTcl. See the Wiki (http://wiki.tcl.tk) for more details. To give an impression: package require Plotchart pack [canvas .c] set p [::Plotchart::createBarchart .c {Jan Feb Mar Apr May} {0 15 5} 1] $p plot absence {5 10 2 7 9} blue $p legend absence "Absence over the past months" would plot your data as a vertical barchart. Regards, Arjen
From: Muhammad Abd El Baset on 28 Dec 2009 08:35 On Dec 28, 2:30 pm, Arjen Markus <arjen.markus...(a)gmail.com> wrote: > On 28 dec, 13:02, Muhammad Abd El Baset <eng.m.abdelba...(a)gmail.com> > wrote: > > > Hello all, > > > I am new with Tcl/tk and I want to build a graph using Tcl/tk. for > > example if I have some data like the following and I want to explain > > them graphically: > > > No. of absent students in a class: 5 10 2 7 9 > > Month : Jan Feb Mar Apr > > May > > > Thanks in advance, > > Mohamed > > There are several possibilities: > - BLT is a very good package for this sort of things > - Plotchart is a very nice one too (but as the author of that package > I am perhaps biased :) > > You can find BLT as part of the ActiveTcl distribution and Plotchart > is > part of Tklib, also part of ActiveTcl. > > See the Wiki (http://wiki.tcl.tk) for more details. > > To give an impression: > > package require Plotchart > > pack [canvas .c] > > set p [::Plotchart::createBarchart .c {Jan Feb Mar Apr May} {0 15 5} > 1] > $p plot absence {5 10 2 7 9} blue > $p legend absence "Absence over the past months" > > would plot your data as a vertical barchart. > > Regards, > > Arjen Thanks a lot for your help Arjen
From: Andreas Kupries on 16 Jan 2010 08:33 Arjen Markus <arjen.markus895(a)gmail.com> writes: > On 28 dec, 13:02, Muhammad Abd El Baset <eng.m.abdelba...(a)gmail.com> > wrote: >> Hello all, >> > You can find BLT as part of the ActiveTcl distribution Clarification: ActiveTcl, the distribution does not contain BLT. What we provide is RBC, the "Refactored BLT Components" (*), and we provide this through our Teapot repository. (*) Which is a subset of BLT where the code implementing them was cleaned up, and providing a TEA based build system, for easier building. This also makes proper use of stubs, allowing use in wrapped applications (starpacks). -- So long, Andreas Kupries <akupries(a)shaw.ca> <http://www.purl.org/NET/akupries/> Developer @ <http://www.activestate.com/> -------------------------------------------------------------------------------
|
Pages: 1 Prev: tcl/tk with mql Next: Scotty Tnm Issue: Problem creating oid handler on notifier |