#!/usr/bin/perl -w
use strict;
use Chart::Gnuplot;
# Create the chart object
my $chart = Chart::Gnuplot->new(
output => 'axisTics_13.png',
xtics => {
labelfmt => '%.1g',
font => 'arial,18',
fontcolor => 'magenta',
},
ytics => {
labels => [-0.8, 0.3, 0.6],
rotate => '30',
mirror => 'off',
},
x2tics => [-8, -6, -2, 2, 5, 9],
y2tics => {
length => "4, 2",
minor => 4,
},
);
# Data set object
my $data = Chart::Gnuplot::DataSet->new(
func => "sin(x)",
);
# Plot the graph
$chart->plot2d($data);