Skip to content

Commit 21b79e1

Browse files
committed
wrong method name
1 parent c728b07 commit 21b79e1

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎spatialmath/base/animate.py‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,15 @@ def __init__(self, axes=None, dims=None, projection='ortho', labels=('X', 'Y', '
6767
self.displaylist = []
6868

6969
if axes is None:
70-
# create an axes
70+
# no axes specified
71+
7172
fig = plt.gcf()
73+
# check any current axes
7274
for a in fig.axes:
7375
if a.name != "3d":
74-
fig.delete(a)
76+
# if they are not 3D axes, remove them, otherwise will
77+
# get plot errors
78+
a.remove()
7579
if len(fig.axes) == 0:
7680
# no axes in the figure, create a 3D axes
7781
axes = fig.add_subplot(111, projection='3d', proj_type=projection)

0 commit comments

Comments
 (0)