Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Graphing Module for Windows XP

by Niner710 (Sexton)
on Jan 17, 2009 at 14:10 UTC ( #737031=perlquestion: print w/replies, xml ) Need Help??
Niner710 has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am having trouble installing perl module GD on my Windows XP system. First, I downloaded the GD module(GD-2.41) from CPAN and tried to run the perl but I got an error.
'gdlib-config' is not recognized as an internal or external command, operable program or batch file. **UNRECOVERABLE ERROR** Could not find gdlib-config in the search path. Please install libgd 2 +.0.28 or h igher. If you want to try to compile anyway, please rerun this script with th +e option - -ignore_missing_gd.
How do I install gdlib on my windows xp machine? I thought the GD module had it self contained? Also, if I were to get everything installed correctly would it be possible to package my script and these libraries together to make a executable file? Sorry for the newbie questions. Any help would be very much appreciated? Thanks.

Original content (above) restored by GrandFather. Substituded content follows:

Hi, I want to create a simple 2D line plot with perl for the data that I crunch. I am using Windows XP and was wondering if anyone could give me a good perl module to use to do this. Thanks.

Replies are listed 'Best First'.
Re: Graphing Module for Windows XP
by planetscape (Chancellor) on Jan 17, 2009 at 19:39 UTC
Re: Graphing Module for Windows XP
by dHarry (Abbot) on Jan 17, 2009 at 20:14 UTC

    I would advice gnuplot, or rather wgnuplot because you use Windows. Beware, there are lots of modules on CPAN for working with gnuplot but they donīt work well with Windows or donīt work at all with Windows. Fortunately itīs simple to generate gnuplot parameter files with plain Perl. You can generate a file containing the to be plotted data, i.e. the x,y values.

    QED example (untested): use Perl to generate a file containing all the stuff gnuplot needs to know.

    set datafile separator "," set xdata time set timefmt "%Y-%m-%dT%H:%M:%S" set term push set terminal png medium size 1200 800 set output './thePlot.png' plot [][-10:40] 'thePlot.csv' using 1:80 title "your title" with line +s title "plot title" with lines; set output set term windows

    After you have generated you call wgnuplot from the Perl script, something like:

    @args = ("gnuplot",$plot_parameters_file); system(@args) == 0 or die "gnuplot failed: $?";


Re: Install Perl Module GD on Windows XP
by zwon (Abbot) on Jan 17, 2009 at 15:33 UTC
Re: Graphing Module for Windows XP
by zentara (Archbishop) on Jan 17, 2009 at 20:04 UTC
    If you want to install Perl/Tk you can use it's canvas to make 2d plots.

    I'm not really a human, but I play one on earth Remember How Lucky You Are

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://737031]
Approved by Corion
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2018-06-20 23:43 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (117 votes). Check out past polls.