This wxWidgets control plots points (e.g. function results) with different colors. It automatically scales its output according to the control size.
The points are passed as pairs of coordinates. Points are connected by lines when drawn.
The control should work on Linux, Windows and Mac operating systems.
SYNOPSIS
use Wx::SimplePlotter;
# init app, window etc.
my $plotter = Wx::SimplePlotter->new();
$plotter->SetColours([0, 0, 0], [255, 0, 0], [0, 0, 255], [0, 255, 0]);
$plotter->SetPoints(...)
# plot ten sinus functions on a logarithmic x scale
my (@a);
for (1..1000) {
for my $i (0..9) {
push @{$a[$i]}, [log($_), sin($_ / 10) * $i];
}
}
$plotter->SetPoints(@a);
# add plotter control to sizer, start app etc.
Product's homepage
Requirements:
· Perl