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 ...
- 02-13-2008 #1Linux 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??
- 02-13-2008 #2
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:
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).Code:pl -stdin -$img -o $file
That's what that pipe symbol means here:
Hope this helps.Code:open (PLOTICUS,"|pl -stdin -$img -o $file");
--
Bill
Old age and treachery will overcome youth and skill.
- 02-14-2008 #3
I suggest you to take a look on the following module:
it is a very good piece for making graphs..Code:use GD::Graph::xylines;
Cheers
- 02-14-2008 #4Linux 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
- 02-14-2008 #5
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.
- 02-14-2008 #6Linux 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.
ThanksSwitched to Scripting
- 02-15-2008 #7
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.


Reply With Quote