PDLPorters / PDLPorters/PDL-Graphics-Gnuplot

Arrows are not drawn

Open
#106 4 comments 0 reactions 1 assignee View on GitHub

@zmughal is already working on this.

Since Mar 8, 2025.

Dominant language
Perl
Stars
9
Forks
8
PR merge metrics
No merged PRs in 30d

Description

This might be a problem between the keyboard and chair, but if so, I'd say it suggests an issue with the documentation.

After reading https://metacpan.org/pod/PDL::Graphics::Gnuplot#arrow-place-an-arrow-or-callout-line-on-the-plot I attempted to draw an arrow on a plot, but nothing was drawn. I can get the similar label to work as expected, but not arrow. See below for an illustration:

use PDL;
use PDL::Graphics::Gnuplot;

my $win = gpwin;
$win->plot(
    {
        # This works
        label => [
            [
                'start',
                at => [ 25, 'graph(0.5)' ],
                'center',
            ],
            [
                'end',
                at => [ 75, 'graph(0.5)' ],
                'center',
            ],
        ],

        # This doesn't
        arrow => [
            [
                from => [ 25, 'graph(0.5)' ],
                to   => [ 75, 'graph(0.5)' ],
            ],
        ],
    },
    sequence(100) ** 2,
);

$win->pause_until_close;

This is the resulting plot, with the labels but no arrows:

gnuplot

Is this a bug in PDL::Graphics::Gnuplot? Or am I missing something?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.