RT#112758: set multiplot next Option
mohawk2 opened this issue · 0 comments
mohawk2 commented
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