Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RT#96750: array refs not accepted by gplot #86

Closed
mohawk2 opened this issue Mar 10, 2022 · 0 comments
Closed

RT#96750: array refs not accepted by gplot #86

mohawk2 opened this issue Mar 10, 2022 · 0 comments

Comments

@mohawk2
Copy link
Member

mohawk2 commented Mar 10, 2022

@djerius writes on https://rt.cpan.org/Ticket/Display.html?id=96750:

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:

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

This works:

pdl> gplot( with => 'points', pdl[ 0, 1, 2 ], pdl[ 0, 1, 2 ] )

Thanks!
Diab

P.S. Please change list ref to array ref in the docs.

mohawk2 added a commit that referenced this issue Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant