NAME

IUP::PPlot - [GUI element] canvas-like element for creating 2D plots

DESCRIPTION

Creates a MathGLPlot-based plot. MathGLPlot is a library for creating plots that is system independent.

USAGE

CREATION - new() method

$plot = IUP::MglPlot->new( TITLE=>"Simple Data", GRID=>"YES" );

Returns: the identifier of the created element, or undef if an error occurs.

NOTE: You can pass to new() other ATTRIBUTE=>'value' or CALLBACKNAME=>\&func pairs relevant to this element - see IUP::Manual::02_Elements.

Auxiliary Functions

PlotBegin()

$plot->PlotBegin($dim);
# $dim = 1 (for 1D) or 2 (for 2D) or 3 (for 3D)

PlotEnd()

$index = $plot->PlotEnd();

PlotNewDataSet()

$plot->PlotNewDataSet($dim);
# $dim = 1 (for 1D) or 2 (for 2D) or 3 (for 3D)

PlotAdd1D()

$plot->PlotAdd1D($name, $y);
#or
$plot->PlotAdd1D(\@name, \@y);
#or
$plot->PlotAdd1D($y);
#or
$plot->PlotAdd1D(\@y);

PlotAdd2D()

$plot->PlotAdd2D($x, $y);
#or
$plot->PlotAdd2D(\@x, \@y);

PlotAdd3D()

$plot->PlotAdd3D($x, $y, $z);
#or
$plot->PlotAdd3D(\@x, \@y, \@z);

PlotInsert1D()

$plot->PlotInsert1D($index, $sample_index, \@name, \@y);
#or
$plot->PlotInsert1D($index, $sample_index, \@y);

PlotInsert2D()

$plot->PlotInsert2D($index, $sample_index, \@x, \@y);

PlotInsert3D()

$plot->PlotInsert3D($index, $sample_index, \@x, \@y, \@z);

PlotAppend1D()

$plot->PlotAppend1D($index, \@name, \@y);
#or
$plot->PlotAppend1D($index, \@y);

PlotAppend2D()

$plot->PlotAppend2D($index, \@x, \@y);

PlotAppend3D()

$plot->PlotAppend3D($index, \@x, \@y, \@z);

PlotSet1D()

$plot->PlotSet1D($index, \@name, \@y);

PlotSet2D()

$plot->PlotSet2D($index, \@x, \@y);

PlotSet3D()

$plot->PlotSet3D($index, \@x, \@y, \@z);

PlotTransform()

($ix, $iy) = $plot->PlotTransform($x, $y, $z);

PlotTransformXYZ()

($x, $y, $z) = $plot->PlotTransformXYZ($ix, $iy);

PlotPaintTo()

$plot->PlotPaintTo($filename);
#or
$plot->PlotPaintTo($w, $h, $dpi, $filename);

Note: only *.svg and *.eps formats are supported

ATTRIBUTES

XXX-TODO

EXAMPLES

Unfortunately there are no sample scripts using this element.

SEE ALSO

IUP::PPlot

The original doc: iup_mglplot.html