Dear Monks,
I would like to able to plot a graph based on two arrays of numbers and then label the points on the graph according to a third array of words. I've been experimenting with Chart::Graph::Gnuplot and the 'extra_opts' variable but can't really see how to pass it my array of words so that it can plot them onto the graph.
In the actual gnuplot program you can say e.g. set label "Yield Point" at 0.003,260, however if I try this within the perl script I just get errors. Has anyone tried to do this before and could help??
Thanks!
my code is below:
gnuplot({"title" => "test",
"x-axis label" => "axis1",
"y-axis label" => "axis2",
#"logscale x2" => "1",
#"logscale y" => "1",
"output type" => "png",
"output file" => "gnuplot2.png",
"extra_opts" => "set label" }, # want to put @names in here
+ somewhere
[{"title" => "", "type" => "columns"}, \@x, \@y],
);
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.