~ubuntu-branches/ubuntu/trusty/libchart-gnuplot-perl/trusty

« back to all changes in this revision

Viewing changes to examples/plot3d_1.pl

  • Committer: Package Import Robot
  • Author(s): Salvatore Bonaccorso
  • Date: 2013-05-14 07:53:48 UTC
  • mfrom: (1.2.5) (3.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20130514075348-usf539rdd1uytjbw
Tags: 0.20-1
* Imported Upstream version 0.20
* Change Vcs-Git to canonical URI (git://anonscm.debian.org)
* Change search.cpan.org based URIs to metacpan.org based URIs
* Update debian/copyright information.
  Update format to copyright-format 1.0 as released together with Debian
  policy 3.9.3.
  Update copyright years for upstream files.
  Update copyright years for debian/* packaging files.
* Bump Standards-Version to 3.9.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
use Chart::Gnuplot;
4
4
 
5
5
# Data in Perl arrays
6
 
my @x = (0 .. 20);
7
 
my @y = (-10 .. 10);
8
 
my @z = map {rand()} @x;
 
6
my (@x, @y, @z) = ();
 
7
for (my $x = -5; $x < 5; $x += 0.02)
 
8
{
 
9
        my $y = sin($x*3);
 
10
        my $z = cos($x*3);
 
11
 
 
12
        push(@x, $x);
 
13
        push(@y, $y);
 
14
        push(@z, $z);
 
15
}
9
16
 
10
17
my $chart = Chart::Gnuplot->new(
11
18
    output => "gallery/plot3d_1.png",