use Chart::Gnuplot; # Data my @x = (1,2,3,4,5,6,7,8,9); my @y = (1,2,3,4,5,6,7,8,9); mkdir "fig"; # Create chart object and specify the properties of the chart my $chart = Chart::Gnuplot->new( output => "fig/simple.png", # title => "Simple testing", # xlabel => "My x-axis label", # ylabel => "My y-axis label", gnuplot => "C:/Users/.../gnuplot423/bin/wgnuplot.exe", convert => "C:/Users/.../lib/convert.exe", terminal => "png", ); # $chart->convert('png'); # Create dataset object and specify the properties of the dataset my $dataSet = Chart::Gnuplot::DataSet->new( xdata => \@x, ydata => \@y, # title => "Plotting a line from Perl arrays", # style => "linespoints", ); # Plot the data set on the chart $chart->plot2d($dataSet);