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#112758: set multiplot next Option #85

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

RT#112758: set multiplot next Option #85

mohawk2 opened this issue Mar 10, 2022 · 0 comments

Comments

@mohawk2
Copy link
Member

mohawk2 commented Mar 10, 2022

Andreas Pawlak writes on https://rt.cpan.org/Ticket/Display.html?id=112758:

Dear Maintainers,

Is it possible to add the

"set multiplot next"

option to PDL::Graphics::Gnuplot. This command is enabled since Gnuplot
4.7 and allow to skip a specific plot in the multiplot regime. Right
now, I can hand code this to my program using something like:

use PDL;
use PDL::Graphics::Gnuplot qw/terminfo gpwin/;

$win = gpwin('qt', persist => 1);
$x = sequence(101)/10;
$y = sin($x);

$win->multiplot(layout => [2,2]);
$win->plot($x, $y);
$win->plot($x, $y);
PDL::Graphics::Gnuplot::_printGnuplotPipe($win, "main", "set multiplot
next");
PDL::Graphics::Gnuplot::_checkpoint($win, "main");
$win->plot($x, $y);

# tested with Gnuplot 5.0.3

A subroutine "multiplot_next" would be great, somelike (not tested):

sub multiplot_next {
    my $this = _obj_or_global(\@_);

    unless($this->{options}->{multiplot}) {
        barf("multiplot_next: you can't, you're not in multiplot mode\n");
    }
       # standard syntax cheking
    _printGnuplotPipe($this, "main", "set multiplot next\n");
    $checkpointMessage = _checkpoint($this, "main");
   # standard checks
}

However, the version checking of Gnuplot should be included, otherwise
an error is thrown by Gnuplot.

Thanks and best regards,
Andreas Pawlak

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