Skip to content

Commit e656e9b

Browse files
committed
plot: fix R4 visualization
1 parent bd9e215 commit e656e9b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pysits/visualization/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ def _base_plot(
104104
# Assuming a plot is a list of elements, we always have many elements.
105105
# Cases where we have a single element indicates that the plot object is
106106
# inside a list.
107-
while len(plots) == 1:
107+
# This is only true when the object is not a ggplot object
108+
while "ggplot2::ggplot" not in list(plots.rclass) and len(plots) == 1:
108109
plots = plots[0]
109110

110111
# Create a temporary file

0 commit comments

Comments
 (0)