#!/usr/bin/perl -w use strict; use Chart::Gnuplot; # Create the chart object my $chart = Chart::Gnuplot->new( output => "circle_1.png", title => "Draw a circle and a fan", ); # Draw a circle $chart->circle( center => "-4, -0.2", size => 3, ); # Draw a fan $chart->circle( center => "2, 0.2", size => 4, arc => [30, 90], # angle in degree ); # Data set object my $dataSet = Chart::Gnuplot::DataSet->new( func => "sin(x)", ); # Plot the graph $chart->plot2d($dataSet);