gianni76 has asked for the
wisdom of the Perl Monks concerning the following question:

I need to be able to write a small program which does some display of simple x-y data.

I have seen the wonders of RRD, but I consider this not very portable and too complex, as it needs compilation and I have to work on multiple machines with no easy access to root permissions. The servers in general do not have access to GD or Imagemagik or anything like that and can be both win32 and linux.

What I would need is a module in pure perl which helps with basic line graphs with no installation requirements (just dump in the release directory and 'use' it from the perl script).
I can insert a series of files on the main directory of my program, but not much more.

The approach taken here: http://www.gerd-tentler.de/tools/perlgraphs/ is exactly what I would need. They have written a small .pm library with most of the functions to do simple but effective displays of graphs. Just their library is only for histograms/pie charts, while I would need some form of line plotting (x-y representation of data).

I would also be prepared to use GD if there was a way to make it portable, i.e. add max 5 library files to the release directory of my script with GD libraries, but am not sure if this is possible.

Any help or suggestions? Probably someone must have written something before the success of GD around.... x-y charting is so useful!

Hi,
I understand your suggestion, but this does not solve the real problem I have, i.e. the portability. gnuplot needs to be installed as well and even more in a win32 environment you need execution (.exe) permissions (which not everyone gives)! A more portable solution I was working on some time ago was with the precompiled versions of netpbm, but I could not use it on some win webspaces as they are blocking .exe files...

This is the reason of my request to have something simple and portable (pure perl, with some intelligent html as done in the chart plotting module)!

Ciao Gianni,
i would try with SWF::Chart, it produces data that can be plotted in a variety of ways from an SWF file; see XML/SWF Charts Gallery for some examples. Unfortunately the Flash part is not open source, but it works really well and the licence is not expensive; there is also a free version with some limitations.

I'm not certain if this will meet your needs but PGPLOT does scatter plots by calling the PGPLOT fortran libraries. Since pre-built Win32 PGPLOT libraries are available it may be a viable option for a portable solution.

Also, FWIW I have used SVG::Graph to create scatter plots, but as valdez noted, you will have to deal with the SVG output.

When putting a smiley right before a closing parenthesis, do you:

Use two parentheses: (Like this: :) )
Use one parenthesis: (Like this: :)
Reverse direction of the smiley: (Like this: (: )
Use angle/square brackets instead of parentheses
Use C-style commenting to set the smiley off from the closing parenthesis
Make the smiley a dunce: (:>
I disapprove of emoticons
Other