Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2466859

Browse files
committed
Simplify Axes3D init.
The _ready flag was only used to avoid calling autoscale_view on a not-fully-inited axes, but is unncessary now that autoscaling is done lazily.
1 parent e240493 commit 2466859

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ def __init__(
9393
# inhibit autoscale_view until the axes are defined
9494
# they can't be defined until Axes.__init__ has been called
9595
self.view_init(self.initial_elev, self.initial_azim)
96-
self._ready = 0
9796

9897
self._sharez = sharez
9998
if sharez is not None:
@@ -116,7 +115,6 @@ def __init__(
116115
else:
117116
self._zcid = None
118117

119-
self._ready = 1
120118
self.mouse_init()
121119
self.set_top_view()
122120

@@ -513,11 +511,7 @@ def autoscale_view(self, tight=None, scalex=True, scaley=True,
513511
514512
.. versionchanged :: 1.2.1
515513
This is now fully functional.
516-
517514
"""
518-
if not self._ready:
519-
return
520-
521515
# This method looks at the rectangular volume (see above)
522516
# of data and decides how to scale the view portal to fit it.
523517
if tight is None:

0 commit comments

Comments
 (0)