Chart-Gnuplot

 view release on metacpan or  search on metacpan

lib/Chart/Gnuplot.pm  view on Meta::CPAN

    # Try to find the executable of Gnuplot
    my $gnuplot = 'gnuplot';
    if (defined $self->{gnuplot})
    {
        $gnuplot = $self->{gnuplot};
    }
    else
    {
        if ($^O =~ /MSWin/)
        {
            my $gnuplotDir = 'C:\Program Files\gnuplot';
            $gnuplotDir = 'C:\Program Files (x86)\gnuplot' if (!-e $gnuplotDir);

            my $binDir = $gnuplotDir.'\bin';
            $binDir = $gnuplotDir.'\binary' if (!-e $binDir);

            $gnuplot = $binDir.'\gnuplot.exe';
            if (!-e $gnuplot)
            {
                $gnuplot = $binDir.'\wgnuplot.exe';
                confess("Gnuplot command not found.") if (!-e $gnuplot);
            }
        }
    }

    # Execute gnuplot
    my $cmd = qq("$gnuplot" "$self->{_script}");

lib/Chart/Gnuplot.pm  view on Meta::CPAN

=head3 plotbg

Background color of the plot area. This option has no effect in 3D plots. See
L<bg> for supported properties.

=head3 gnuplot

The path of Gnuplot executable. This option is useful if you are using Windows
or have multiple versions of Gnuplot installed. E.g.,

    gnuplot => "C:\Program Files\...\gnuplot\bin\wgnuplot.exe"   # for Windows

=head3 convert

The path of convert executable of ImageMagick. This option is useful if you
have multiple convert executables.

=head3 terminal

The terminal driver that Gnuplot uses. E.g.,



( run in 0.232 second using v1.01-cache-2.11-cpan-87723dcf8b7 )