Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions macros/core/PGbasicmacros.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2923,7 +2923,7 @@ sub image {
);
next;
}
if (ref $image_item eq 'Plots::Plot' || ref $image_item eq 'Plots::StatPlot') {
if (eval { $image_item->isa('Plots::Plot') }) {
# Update image attributes as needed.
$image_item->{width} = $width if $out_options{width};
$image_item->{height} = $height if $out_options{height};
Expand All @@ -2942,7 +2942,9 @@ sub image {
$width_ratio = 0.001 * $image_item->{tex_size};
}
$image_item = insertGraph($image_item)
if (grep { ref $image_item eq $_ } ('WWPlot', 'Plots::Plot', 'Plots::StatPlot', 'PGlateximage', 'PGtikz'));
if grep {
eval { $image_item->isa($_) }
} ('WWPlot', 'Plots::Plot', 'LaTeXImage');
my $imageURL = alias($image_item) // '';
$imageURL = ($envir{use_site_prefix}) ? $envir{use_site_prefix} . $imageURL : $imageURL;
my $id = $main::PG->getUniqueName('img');
Expand Down