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); # Create chart object and specify the properties of the chart my $chart = Chart::Gnuplot->new( output => "C:/Users/Marco/Desktop/simple.jpg", # title => "Simple testing", # xlabel => "My x-axis label", # ylabel => "My y-axis label", /bin/wgnuplot.exe", ); # 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);