The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


  LinePlotDataset - An Object into which to store data to be plotted by the LineGraph widget.


LinePlotDataset is an object into which data and meta data can be stored. This object can be plotted by the LineGraph widget.


new(-yArray => Y data array -name => dataset name, -yAxis => "Y|Y1", -color => line Color, -xArray => X data array);

The Y array data and the dataset name are required. Other parameters are optional. The yAxis defaults to the Y (left hand) axis. The color for the graph of the dataset defaults to one the plot default colors. The X array data defaults to the integers (0 .. size of yArray).

The Dataset objects copies the data arrays.


     use Tk;
     use Tk::LineGraph;
     use Tk::LineGraphDataset;

     my $mw = MainWindow->new;

     my $cp = $mw->LineGraph(-width=>500, -height=>500, -background => snow)->grid;

     my @yArray = (1..5,11..18,22..23,99..300,333..555,0,0,0,0,600,600,600,600,599,599,599);
     my $ds = LineGraphDataset->new(-yData=>\@yArray,-name=>"setOne");



    Returns the current value of the option.   Options are listed in the constructor.
set(option , value);
    Sets the option to value.  Options are listed in the constructor.


Tom Clifford (

Copyright (C) Tom Clifford. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


Graph 2D Axis Graph Dataset

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 101:

'=item' outside of any '=over'

Around line 109:

You forgot a '=back' before '=head1'