mhearse has asked for the wisdom of the Perl Monks concerning the following question:
use Tk; use Tk::Graph; use Tk::NoteBook; my $data = { Sleep => 51, Work => 135, Access => 124, mySQL => 5 }; my $to_register = { 'one' => [0,5,4,8,6,8], 'two' => [2,5,9,4,6,2], 'three' => [0,5,6,8,6,8], }; my $data1 = { 'one' => 3, 'two' => 3, 'three' => 3, }; $mw = MainWindow->new; my $nb = $mw->NoteBook(-ipadx => 10, -ipady => 10) ->pack(-side => 'top', -expand => '1', -fill => 'both'); ############# PAGE 1 ############# my $page1 = $nb->add("page1", -label => " test "); my $graph = $page1->Graph(-type => 'BARS')->pack(-expand => 1, -fill => 'both'); $graph->configure(-variable => $data); $graph->set($data); ############# PAGE 1 ############# my $page2 = $nb->add("page2", -label => " test1 "); my $graph1 = $page2->Graph(-type => 'Line', -max => 10, -look => 10)->pack(-expand => 1, -fill => 'both'); $graph1->register($to_register); $graph1->variable($data1); MainLoop;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Multiple Tk::Graphs with Tk::Notebook widget
by zentara (Cardinal) on May 02, 2005 at 12:14 UTC | |
by mhearse (Chaplain) on May 02, 2005 at 18:23 UTC | |
|
Re: Multiple Tk::Graphs with Tk::Notebook widget
by PodMaster (Abbot) on May 02, 2005 at 05:11 UTC | |
by mhearse (Chaplain) on May 02, 2005 at 07:05 UTC | |
by PodMaster (Abbot) on May 02, 2005 at 07:24 UTC | |
|
Re: Multiple Tk::Graphs with Tk::Notebook widget
by Courage (Parson) on May 02, 2005 at 09:56 UTC |