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