Skip to content

Commit c235398

Browse files
committed
Update remove fn
1 parent 9b285c8 commit c235398

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

roboticstoolbox/backends/PyPlot/EllipsePlot.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
class ShapePlot:
1414
def __init__(self, shape, wireframe=True, **kwargs):
15-
1615
self.shape = shape # reference to the spatialgeom shape
1716
self.wireframe = wireframe
1817
self.args = kwargs
@@ -54,7 +53,6 @@ def make(self):
5453

5554
class EllipsePlot:
5655
def __init__(self, robot, q, etype, opt="trans", centre=[0, 0, 0], scale=1.0):
57-
5856
super(EllipsePlot, self).__init__()
5957

6058
try:
@@ -65,7 +63,7 @@ def __init__(self, robot, q, etype, opt="trans", centre=[0, 0, 0], scale=1.0):
6563
except TypeError:
6664
if centre != "ee":
6765
raise ValueError(
68-
"Centre must be a three vector or 'ee' meaning" "end-effector"
66+
"Centre must be a three vector or 'ee' meaningend-effector"
6967
)
7068

7169
self.ell = None
@@ -91,7 +89,11 @@ def draw(self):
9189
self.make_ellipsoid()
9290

9391
if self.ell is not None:
94-
self.ax.collections.remove(self.ell)
92+
self.ell.remove()
93+
# print(type(self.ell))
94+
# print(type(self.ax))
95+
# assert True == False
96+
# self.ax.collections.remove(self.ell)
9597

9698
self.ell = self.ax.plot_wireframe(
9799
self.x, self.y, self.z, rstride=6, cstride=6, color="#2980b9", alpha=0.2
@@ -181,7 +183,7 @@ def make_ellipsoid2(self):
181183
A = J @ J.T
182184
elif self.opt == "rot":
183185
raise ValueError(
184-
"Can not do rotational ellipse for a 2d robot plot." " Set opt='trans'"
186+
"Can not do rotational ellipse for a 2d robot plot. Set opt='trans'"
185187
)
186188

187189
# if not self.vell:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy