Skip to content

Commit ff9ec36

Browse files
committed
Support derived Animate classes
1 parent 8d48e5a commit ff9ec36

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spatialmath/base/graphics.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1113,8 +1113,8 @@ def _axes_dimensions(ax):
11131113
:rtype: int
11141114
"""
11151115
classname = ax.__class__.__name__
1116-
1117-
if classname in ("Axes3DSubplot", "Animate"):
1116+
base_classes = ax.__class__.__bases__
1117+
if classname in ("Axes3DSubplot", "Animate") or any(base_class.__name__ in ("Axes3DSubplot", "Animate") for base_class in base_classes):
11181118
return 3
11191119
elif classname in ("AxesSubplot", "Animate2"):
11201120
return 2

0 commit comments

Comments
 (0)