#!/usr/bin/perl -w
use strict;
use Chart::Gnuplot;
# Create the chart object
my $chart = Chart::Gnuplot->new(
output => 'grid_9.png',
xtics => {minor => 4},
ytics => {minor => 4},
grid => {
linetype => 'longdash',
color => 'light-blue',
width => 5,
xlines => 'off',
},
minorgrid => {
linetype => 'dot-longdash',
color => 'dark-green',
width => 1,
ylines => 'off',
},
);
# Data set object
my $data = Chart::Gnuplot::DataSet->new(
func => 'sin(x)',
);
# Plot the graph
$chart->plot2d($data);