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;
| [reply] [d/l] |
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
| [reply] |
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.
| [reply] |
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.
| [reply] |