Subject: | array refs not accepted by gplot |
The documentation states that "list refs" are acceptable as data
columns. (To be pedantic, this is incorrect terminology. They are
array refs; you can't take a ref to a list.)
However, it seems they aren't:
Show quoted text
pdl> use PDL::Graphics::Gnuplot
pdl> gplot( with => 'points', [ 0, 1, 2 ], [ 0, 1, 2 ] )
Runtime error: No curve option found that matches '0'
(Did you mix plot options and curve options at the beginning of the arg list?)
at [...]/5.16.3/PDL/Graphics/Gnuplot.pm line 3195, <FOO> line 178.
PDL::Graphics::Gnuplot::parseArgs(PDL::Graphics::Gnuplot=HASH(0x462f658), "with", "points", ARRAY(0x4620d40), ARRAY(0x3f01fb8)) called at [...]5.16.3/PDL/Graphics/Gnuplot.pm line 2501
PDL::Graphics::Gnuplot::plot("with", "points", ARRAY(0x4620d40), ARRAY(0x3f01fb8)) called at (eval 505) line 5
Show quoted textpdl> gplot( with => 'points', pdl[ 0, 1, 2 ], pdl[ 0, 1, 2 ] )
[ this works ].
Thanks!
Diab
P.S. Please change list ref to array ref in the docs.