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

Re: Intro to plotting with perl

by Lotus1 (Vicar)
on Jan 03, 2012 at 17:41 UTC ( [id://946101]=note: print w/replies, xml ) Need Help??


in reply to Intro to plotting with perl

I've heard other monks here say nice things about gnuplot.

Here is a perlmonks example: Plot a spiral with gnuplot.

Replies are listed 'Best First'.
Re^2: Intro to plotting with perl
by educated_foo (Vicar) on Jan 04, 2012 at 04:00 UTC
    This. If you want to make graphs for a scientific publication, use Gnuplot. Your other uppercase-f-Free options are Octave (who knows how it will turn out since they stopped using Gnuplot), some Python thing (SciPy, of which I know little), and doing it yourself by hand (learn PostScript or some other vector drawing language).

    However, the linked node has a bunch of extraneous garbage. (Also, it doesn't even work, since it doesn't bother to flush the temporary file before using it.) All you really need is some version of:

    open DATAFILE, ">$whatever"; # write data to DATAFILE close DATAFILE; open PLOT, "| gnuplot"; print PLOT <<EOS; ... p '$whatever' ... (gnuplot options) ... ... EOS close PLOT;

      Well don't use a temporary file then ;)

      Just use gnuplot's special file '-' and inline the data.

      I added a node to show how it's done to the above example at Re: Plot a spiral with gnuplot

      However, the linked node has a bunch of extraneous garbage.

      I don't see anything extraneous or any garbage. I found that node months ago when I was curious about gnuplot and found it to be short and sweet and to the point with helpful links.

      (Also, it doesn't even work, since it doesn't bother to flush the temporary file before using it.)

      It has been a while since I tried the code in that node but I just remember quickly having a plot of a pretty spiral without much (any) effort on my part.

        I don't see anything extraneous or any garbage.
        How do strict.pm, warnings.pm, and IO/Handle.pm help plot a graph? Why is Perl 5.10 necessary? All that is superstitious, useless programming.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2024-04-23 13:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found