Find the answer to your Linux question:
Results 1 to 7 of 7
Anyone help me in finding a tutorial to generate chart/graph in perlCGI. There are few scripts I have which are written to generate graph but I am not able to ...
  1. #1
    Linux Newbie
    Join Date
    Jan 2008
    Posts
    114

    How to generate graph in PerlCGI, what is PLOTICUS

    Anyone help me in finding a tutorial to generate chart/graph in perlCGI.

    There are few scripts I have which are written to generate graph but I am not able to understand, please help

    open (PLOTICUS,"|pl -stdin -$img -o $file");
    print PLOTICUS @graph_str;
    print "closing ploticus file handle\n" if ($debug > 0);
    close PLOTICUS;
    print "done running gen_graph\n" if ($debug > 0);

    What is PLOTICS??

  2. #2
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    There's nothing special about PLOTICUS. It's simply a handle used to tie together the open, close, and print statements. As the debug statements in your code hint, in Perl land that's what's called a file handle.

    You may wish to take a closer look at that open statement. That tells Perl that any data you output on that file handle is to be taken as standard input to the following command, as though you had typed it on the bash command line:
    Code:
    pl -stdin -$img -o $file
    except, of course, that $img and $file are Perl variables which have been filled with particular values before you do the Perl open (we hope).

    That's what that pipe symbol means here:
    Code:
    open (PLOTICUS,"|pl -stdin -$img -o $file");
    Hope this helps.
    --
    Bill

    Old age and treachery will overcome youth and skill.

  3. #3
    Just Joined! vigour's Avatar
    Join Date
    Oct 2007
    Posts
    68
    I suggest you to take a look on the following module:

    Code:
    use GD::Graph::xylines;
    it is a very good piece for making graphs..

    Cheers

  4. #4
    Linux Newbie
    Join Date
    Jan 2008
    Posts
    114
    I am sorry wje_lf, not able to understand fully. Could please put some more light on it or give some simple example.

    Thanks

  5. #5
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    I am uncertain as how to proceed here, the level at which to explain, and I want to find out, so please do not be offended by the following question: How familiar are you with Perl programming?
    --
    Bill

    Old age and treachery will overcome youth and skill.

  6. #6
    Linux Newbie
    Join Date
    Jan 2008
    Posts
    114
    This is a little tough question for me but I would say I am just above the beginner level.

    Thanks
    Switched to Scripting

  7. #7
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    I recommend you browse through this, and slow down to read thoroughly the section "Files and I/O":

    perlintro - perldoc.perl.org

    Then glance through this, and slow down to read thoroughly the section "Pipe Opens":

    perlopentut - perldoc.perl.org

    Then later, when you have time, swim in this pool:

    Online Documentation - perl.org

    The water's fine!
    --
    Bill

    Old age and treachery will overcome youth and skill.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...