Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Graph in Perl

Reply
Thread Tools

Graph in Perl

 
 
jupiter
Guest
Posts: n/a
 
      01-13-2007
Hi

I am a beginner. s it possible to draw graph in perl in real time ?


@nil

 
Reply With Quote
 
 
 
 
Brian McCauley
Guest
Posts: n/a
 
      01-13-2007

jupiter wrote:
>
> I am a beginner. s it possible to draw graph in perl in real time ?


Define "in real time"?

If you want dynamic updates to a graph as new data comes in then a lot
will depend on the mechanism by which the graph is being displayed.

There are many graphing modules on CPAN but these are a batch process,
taking a set of data and producing an graphical image file (PNG or
whatever). Of course this process can fairly fast so depending on what
you mean by "in real time" it may be fast enough.

For example, if the graph is viewed in a web page, you could have a CGI
script on a web server that generates a PNG on the fly every time a
given URL is requested. Simply refeshing the browser view would give
the impression that the graph was dynamically updating but in fact it's
being rebuilt from scratch each time.

 
Reply With Quote
 
 
 
 
zentara
Guest
Posts: n/a
 
      01-13-2007
On 12 Jan 2007 20:44:46 -0800, "jupiter" <(E-Mail Removed)>
wrote:

>Hi
>
>I am a beginner. s it possible to draw graph in perl in real time ?
>
>
>@nil


For a well documented solution, see:
http://oss.oetiker.ch/rrdtool/index.en.html


There are as many solutions as there are languages.
For a simple Perl/Tk example, see:
http://perlmonks.org?node_id=577181

zentara


--
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html
 
Reply With Quote
 
jupiter
Guest
Posts: n/a
 
      01-14-2007

zentara wrote:
> On 12 Jan 2007 20:44:46 -0800, "jupiter" <(E-Mail Removed)>
> wrote:
>
> >Hi
> >
> >I am a beginner. s it possible to draw graph in perl in real time ?
> >
> >
> >@nil

>
> For a well documented solution, see:
> http://oss.oetiker.ch/rrdtool/index.en.html
>
>
> There are as many solutions as there are languages.
> For a simple Perl/Tk example, see:
> http://perlmonks.org?node_id=577181
>
> zentara
>
>
> --
> I'm not really a human, but I play one on earth.
> http://zentara.net/japh.html



thanx for fast n easy reply

what i want is when i start program it should extract webpage with
lwpcook module
process data means clean up n extract vales i want
make a database to store these values then
it should do some calculation on data already stored
display them within program (dont want any graphic file) n update as
new data comes (using multithreading)

i am able to extract data but not sure how to handle database issue n
graph issue as i know perl is not database oriented script language nor
graphics oriented. so should i do what i want in perl or vb is better
option?

 
Reply With Quote
 
zentara
Guest
Posts: n/a
 
      01-14-2007
On 14 Jan 2007 00:48:36 -0800, "jupiter" <(E-Mail Removed)>
wrote:


>what i want is when i start program it should extract webpage with
>lwpcook module
>process data means clean up n extract vales i want
>make a database to store these values then
>it should do some calculation on data already stored
>display them within program (dont want any graphic file) n update as
>new data comes (using multithreading)
>
>i am able to extract data but not sure how to handle database issue n
>graph issue as i know perl is not database oriented script language nor
>graphics oriented. so should i do what i want in perl or vb is better
>option?


wel, yor righting style makes it hard for me to fig out what u want.

but since you are already using Perl, with LWP and the Database,
you could make graphs with many different Perl modules. GD is
often used.



--
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html
 
Reply With Quote
 
jupiter
Guest
Posts: n/a
 
      01-14-2007

zentara wrote:
> On 14 Jan 2007 00:48:36 -0800, "jupiter" <(E-Mail Removed)>
> wrote:
>
>
> >what i want is when i start program it should extract webpage with
> >lwpcook module
> >process data means clean up n extract vales i want
> >make a database to store these values then
> >it should do some calculation on data already stored
> >display them within program (dont want any graphic file) n update as
> >new data comes (using multithreading)
> >
> >i am able to extract data but not sure how to handle database issue n
> >graph issue as i know perl is not database oriented script language nor
> >graphics oriented. so should i do what i want in perl or vb is better
> >option?

>
> wel, yor righting style makes it hard for me to fig out what u want.
>
> but since you are already using Perl, with LWP and the Database,
> you could make graphs with many different Perl modules. GD is
> often used.
>
>
>
> --
> I'm not really a human, but I play one on earth.
> http://zentara.net/japh.html


I have seen this module it will create png file I dont want to make a
file I want this graph to appear within program n update in real time
as well, means as soon as new data comes it should update graph (data
will be updated in mintues)

 
Reply With Quote
 
zentara
Guest
Posts: n/a
 
      01-15-2007
On 14 Jan 2007 08:08:44 -0800, "jupiter" <(E-Mail Removed)>
wrote:


>
>I have seen this module it will create png file I dont want to make a
>file I want this graph to appear within program n update in real time
>as well, means as soon as new data comes it should update graph (data
>will be updated in mintues)


Is this for a cgi program? If so, you will need to create some sort of
file and update it and refresh your cgi. Maybe you could make some sort
of flash that would do it.

Otherwise, if it's a desktop app you want, the Tk script at
http://perlmonks.org?node_id=577181

does what you ask. Although you will need to customize it to suit
your situation.

zentara


--
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Boost.Graph] graph.vertices property creates new objects George Sakkis Python 1 01-29-2007 11:09 PM
Help with initialization of graph (Boost Graph Library) Jef Driesen C++ 3 01-24-2006 01:44 PM
Missing Graph.h and (Graph.lib) woes - any help Dr Ann Huxtable C Programming 6 12-21-2004 11:15 AM
perl graph theory (using Graph::Directed) IRR Perl Misc 2 07-27-2004 03:08 AM
GD::Graph: "mixed" graph doesn't recognize "area" graph type Emilio Mayorga Perl Misc 6 10-08-2003 02:14 AM



Advertisments