Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

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 # # # 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}

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://695225]
[Your Mother]: Nice!!!
[Your Mother]: That was for LanX, not you. For you: TERRIBLE!!!!
[Your Mother]: Moral: Be more like LanX.
[shmem]: what nicety is next?
[shmem]: pardon me, I chimed in too late

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2018-03-19 20:34 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (246 votes). Check out past polls.