@@ -415,6 +415,9 @@ a single array ref containing (nx, ny). Subsequent calls to plot
415
415
send graphics to subsequent locations on the window. The ordering
416
416
is always horizontal first, and left-to-right, top-to-bottom.
417
417
418
+ B<NOTE > for multiplotting: C<oplot > does not work and will cause an
419
+ exception. This is a limitation imposed by Gnuplot.
420
+
418
421
=back
419
422
420
423
=cut
@@ -849,8 +852,7 @@ sub _translate_plot {
849
852
@$po {keys %$h } = values %$h ;
850
853
}
851
854
852
- my $called_from_imag = $po -> {called_from_imag };
853
- delete $po -> {called_from_imag };
855
+ my $called_from_imag = delete $po -> {called_from_imag };
854
856
855
857
$po = $plot_options -> options($po );
856
858
$po -> {oplot } = 1 if $held ;
@@ -950,7 +952,6 @@ sub _translate_plot {
950
952
push @args , shift ;
951
953
}
952
954
953
-
954
955
# #############################
955
956
# Most array refs get immediately converted to
956
957
# PDLs. But the last argument to a "with=labels" curve
@@ -1078,6 +1079,7 @@ sub _translate_plot {
1078
1079
sub plot {
1079
1080
my $obj = &_invocant_or_global;
1080
1081
my @args = _translate_plot(@$obj {qw( held keys) }, @_ );
1082
+ barf " Can't oplot in multiplot" if $obj -> {params }{multi } and $args [1]{oplot };
1081
1083
$obj -> {obj }{keys } = $obj -> {keys } = shift @args ;
1082
1084
$obj -> {obj }-> plot(@args );
1083
1085
}
@@ -1099,16 +1101,8 @@ so that the plot will be overlain on the previous one.
1099
1101
=cut
1100
1102
1101
1103
sub oplot {
1102
- my $h ;
1103
-
1104
- if (ref ($_ [$#_ ]) eq ' HASH' ) {
1105
- $h = $_ [$#_ ];
1106
- } else {
1107
- $h = {};
1108
- push @_ , $h ;
1109
- }
1110
- $h -> {replot } = 1;
1111
-
1104
+ push @_ , {} if ref ($_ [-1]) ne ' HASH' ;
1105
+ $_ [-1]{oplot } = 1;
1112
1106
plot(@_ );
1113
1107
}
1114
1108
0 commit comments