in reply to Locating Chart::Gnuplot

Hello SevenDimensions,

Welcome to the Monastery. How did you install both Perl and Charts::Gnuplot from source? Have you tried to install through cpan?

Form me I am running on LinuxOS Perl and I just installed the Charts::Gnuplot through cpan and it seems to be working just fine. I tested with the sample of code from the documentation:

#!/usr/bin/perl use strict; use warnings; use Data::Dumper; use Chart::Gnuplot; # Data my @x = (-10 .. 10); my @y = (0 .. 20); # Create chart object and specify the properties of the chart my $chart = Chart::Gnuplot->new( output => "fig/simple.png", title => "Simple testing", xlabel => "My x-axis label", ylabel => "My y-axis label", ); # 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); __END__ $ perl test.pl $ ls -la fig | grep simple -rw-rw-r-- 1 tinyos tinyos 9401 Feb 1 19:18 simple.png

On your OS have you installed also gnuplot? It will be necessary alternatively you will get the error sh: 1: gnuplot: not found.

Looking forward to your reply, BR.

Seeking for Perl wisdom...on the process of learning...not there...yet!

Replies are listed 'Best First'.
Re^2: Locating Chart::Gnuplot
by SevenDimensions (Initiate) on Feb 02, 2018 at 11:07 UTC

    Hi Thanos1983

    Thank you very much for your response :) When I get to the line  $chart->plot2d($dataset); in your example script, I get the error  sh: convert: command not found. Did you get this issue?

    Thanks in advance!

      sh: convert: command not found

      convert is probably from ImageMagick. On Windows you can use its installer, on *NIX systems I usually find it easiest to use the system's package manager, e.g. on Debian/Ubuntu sudo apt-get install imagemagick (or sudo apt-get install graphicsmagick-imagemagick-compat).