#!/usr/bin/perl -w
use strict;
use Chart::Gnuplot;
# Create the chart object
my $chart = Chart::Gnuplot->new(
output => "polygons_3.png",
title => "Border color of the polygon",
);
# Draw a polygon
$chart->polygon(
vertices => [
" -3, 0.5",
"-7, -0.2",
{to => "2, -0.4"},
{rto => "0, 0.5"},
],
border => {color => "#5050FF"},
);
# Data set object
my $dataSet = Chart::Gnuplot::DataSet->new(
func => "sin(x)",
);
# Plot the graph
$chart->plot2d($dataSet);