Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
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 meditating upon the Monastery: (12)
As of 2014-10-02 17:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (67 votes), past polls