File: dataSrc_1.pl

package info (click to toggle)
libchart-gnuplot-perl 0.23-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 944 kB
  • sloc: perl: 4,862; makefile: 113
file content (20 lines) | stat: -rwxr-xr-x 332 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/perl -w
use strict;
use Chart::Gnuplot;

# Input data source
my @x = (-10 .. 10);
my @y = (0 .. 20);

# Chart object
my $chart = Chart::Gnuplot->new(
    output => "gallery/dataSrc_1.png",
);

# Data set object
my $dataSet = Chart::Gnuplot::DataSet->new(
    xdata => \@x,
    ydata => \@y,
);

$chart->plot2d($dataSet);