Graph in Perl

B

Brian McCauley

jupiter said:
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.
 
J

jupiter

zentara said:
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


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?
 
Z

zentara

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.
 
J

jupiter

zentara said:
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 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)
 
Z

zentara

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top