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

Skip to content

Commit 5011321

Browse files
committed
fix 3d
1 parent 7f478cb commit 5011321

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

lib/matplotlib/figure.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,6 @@ def __init__(self):
265265
def _get_draw_artists(self, renderer):
266266
"""Also runs apply_aspect"""
267267
artists = self.get_children()
268-
269268
for sfig in self.panels:
270269
artists.remove(sfig)
271270
childa = sfig.get_children()
@@ -686,7 +685,6 @@ def add_axes(self, *args, **kwargs):
686685

687686
# create the new axes using the axes class given
688687
a = projection_class(self, rect, **kwargs)
689-
690688
return self._add_axes_internal(key, a)
691689

692690
@docstring.dedent_interpd
@@ -833,7 +831,6 @@ def add_subplot(self, *args, **kwargs):
833831
# more similar to add_axes.
834832
self._axstack.remove(ax)
835833
ax = subplot_class_factory(projection_class)(self, *args, **kwargs)
836-
837834
return self._add_axes_internal(key, ax)
838835

839836
def _add_axes_internal(self, key, ax):
@@ -2052,7 +2049,6 @@ def draw(self, renderer):
20522049

20532050
finally:
20542051
self.stale = False
2055-
print('Drawing sub')
20562052

20572053

20582054

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,6 @@ def __init__(
136136
pseudo_bbox = self.transLimits.inverted().transform([(0, 0), (1, 1)])
137137
self._pseudo_w, self._pseudo_h = pseudo_bbox[1] - pseudo_bbox[0]
138138

139-
self.figure.add_axes(self)
140-
141139
# mplot3d currently manages its own spines and needs these turned off
142140
# for bounding box calculations
143141
for k in self.spines.keys():
@@ -466,7 +464,6 @@ def draw(self, renderer):
466464
axis.draw(renderer)
467465

468466
# Then rest
469-
print("draw")
470467
super().draw(renderer)
471468

472469
def get_axis_position(self):

lib/mpl_toolkits/tests/test_mplot3d.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,7 @@ def test_add_collection3d_zs_scalar():
623623
def test_axes3d_labelpad():
624624
fig = plt.figure()
625625
ax = Axes3D(fig)
626+
fig.add_axes(ax)
626627
# labelpad respects rcParams
627628
assert ax.xaxis.labelpad == mpl.rcParams['axes.labelpad']
628629
# labelpad can be set in set_label

0 commit comments

Comments
 (0)