#!/usr/bin/perl -w use strict; use Chart::Gnuplot; # Set the SVG terminal my $terminal = 'svg mouse jsdir '. '"http://gnuplot.sourceforge.net/demo_svg"'; # Create the chart object my $chart = Chart::Gnuplot->new( terminal => $terminal, output => "mouse_3.svg", title => "Click on the plot to enable the ". "mousing interaction", ); # Data set my $dataSet = Chart::Gnuplot::DataSet->new( func => "cos(x)", ); # Plot the graph $chart->plot2d($dataSet);