use strict; use warnings; use Chart::Gnuplot; my $chart = Chart::Gnuplot->new( gnuplot => 'C:\usr\bin\gnuplot.bat', terminal => 'wxt', yrange => [0,5], ylabel => 'Primary 1-4', y2range => [0,50], y2label => 'Secondary 10-40', y2tics => [0, 10, 20, 30, 40, 50] ); my $dataset1 = Chart::Gnuplot::DataSet->new( ydata => [1,2,3,4] ); my $dataset2 = Chart::Gnuplot::DataSet->new( ydata => [11,21,31,41], axes => 'x1y2' ); $chart->plot2d($dataset1, $dataset2);