Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: CGI modules for plotting & graphing

by starbolin (Hermit)
on Jul 02, 2008 at 22:39 UTC ( #695225=note: print w/ replies, xml ) Need Help??


in reply to CGI modules for plotting & graphing

The previous posters gave excellent input. Allow me to expand and enhance. I recently put quite a bit of time into understanding gnuplot. Be warned that the options available to you in a graphics window are different than those that are available when you print to a file. This, and the non-orthogonal arrangement of options, caused my quite a lot of consternation. I eventually decided gnuplot did not suit my data set so I ended up switching back to GD and it's offspring. Now I'm much happier.

I case you wind up going that route, here is a perl script to launch gnuplot and feed it a list of commands. The commands generate a png file.

#!/usr/bin/perl # # ptoplot.pl # use strict; use warnings; my $output_file = "graphics/plot1"; my $cmd = '| gnuplot - 2>&1'; open PLOT, "$cmd" or die; while (<DATA>) { print PLOT "$_"; } qx("sync"); __DATA__ set terminal png medium color picsize 800 600 set output "graphics/plot1" set title 'Splot of file plot.dat' set style data dots # set hidden3d # set data palette set contour base set zlabel 'amplitude' splot "graphics/plot.dat" matrix with lines show output


s//----->\t/;$~="JAPH";s//\r<$~~/;{s|~$~-|-~$~|||s |-$~~|$~~-|||s,<$~~,<~$~,,s,~$~>,$~~>,, $|=1,select$,,$,,$,,1e-1;print;redo}


Comment on Re: CGI modules for plotting & graphing
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://695225]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (10)
As of 2015-07-29 22:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls