#!/usr/bin/perl -w use strict; use Chart::Gnuplot; # Check if the OS is Windows die "Must be run in Windows" if ($^O !~ /MSWin/); # Initiate the chart object my $chart = Chart::Gnuplot->new( terminal => 'windows', title => "Mouse interaction in Windows", ); # Data sets my $dataSet = Chart::Gnuplot::DataSet->new( func => "sin(x)", ); # Plot the graph $chart->plot2d($dataSet);