#!/usr/bin/perl -w
use strict;
use Chart::Gnuplot;
# Create the chart object
my $chart = Chart::Gnuplot->new(
output => "contour.png",
contour => 'base',
view => 'map',
legend => {position => 'outside'},
isosamples => 50,
imagesize => '0.45,0.45',
);
# Don't plot the surface
$chart->command("unset surface");
# Data set object
my $dataSet = Chart::Gnuplot::DataSet->new(
func => "x**2 - 2*(y**2)",
width => 5,
);
# Plot the graph
$chart->plot3d($dataSet);