Tk::PlotDatasetAn extended version of the canvas widget for plotting 2D line graphs | |
Download |
Tk::PlotDataset Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Bruce Mitchell
- Publisher web site:
- http://search.cpan.org/~itdev/
Tk::PlotDataset Tags
Tk::PlotDataset Description
An extended version of the canvas widget for plotting 2D line graphs PlotDataset is a quick and easy way to build an interactive plot widget into a Perl application. The Tk::PlotDataset module is written entirely in Perl/Tk.The widget is an extension of the Canvas widget that will plot LineGraphDataset objects as lines onto a 2D graph. The axes can be automatically scaled or set by the code. The axes can have linear or logarithmic scales and there is also an option of an additional y-axis (y1).SYNOPSIS use Tk; use Tk::PlotDataset; use Tk::LineGraphDataset; my $main_window = MainWindow -> new; my @data1 = (0..25); my $dataset1 = LineGraphDataset -> new ( -name => 'Data Set One', -yData => \@data1, -yAxis => 'Y', -color => 'purple' ); my @data2x = (0..25); my @data2y = (); foreach my $xValue (@data2x) { push (@data2y, $xValue ** 2); } my $dataset2 = LineGraphDataset -> new ( -name => 'Data Set Two', -xData => \@data2x, -yData => \@data2y, -yAxis => 'Y1', -color => 'blue' ); my $graph = $main_window -> PlotDataset ( -width => 500, -height => 500, -background => 'snow' ) -> pack(-fill => 'both', -expand => 1); $graph -> addDatasets($dataset1, $dataset2); $graph -> plot; MainLoop; Requirements: · Perl
Tk::PlotDataset Related Software