File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -42,12 +42,7 @@ def draw(self, renderer: RendererBase):
42
42
# If we are working with a 3D object, swap out it's axes with
43
43
# this zoom axes (swapping out the 3d transform) and reproject it.
44
44
if (hasattr (self ._artist , "do_3d_projection" )):
45
- ax = self ._artist .axes
46
- self ._artist .axes = None
47
- self ._artist .axes = self ._renderer .bounding_axes
48
- self ._artist .do_3d_projection ()
49
- self ._artist .axes = None
50
- self ._artist .axes = ax
45
+ self .do_3d_projection ()
51
46
52
47
# Check and see if the passed limiting box and extents of the
53
48
# artist intersect, if not don't bother drawing this artist.
@@ -57,6 +52,18 @@ def draw(self, renderer: RendererBase):
57
52
# Re-enable the clip box...
58
53
self ._artist .set_clip_box (clip_box_orig )
59
54
55
+ def do_3d_projection (self ):
56
+ do_3d_projection = getattr (self ._artist , "do_3d_projection" )
57
+
58
+ ax = self ._artist .axes
59
+ self ._artist .axes = None
60
+ self ._artist .axes = self ._renderer .bounding_axes
61
+ res = do_3d_projection ()
62
+ self ._artist .axes = None
63
+ self ._artist .axes = ax
64
+
65
+ return res
66
+
60
67
61
68
def view_wrapper (axes_class : Type [Axes ]) -> Type [Axes ]:
62
69
"""
You can’t perform that action at this time.
0 commit comments