@@ -481,7 +481,6 @@ def __init__(self, fig, rect,
481
481
""" % {'scale' : ' | ' .join (
482
482
[repr (x ) for x in mscale .get_scale_names ()])}
483
483
martist .Artist .__init__ (self )
484
- self ._in_init = True
485
484
if isinstance (rect , mtransforms .Bbox ):
486
485
self ._position = rect
487
486
else :
@@ -579,8 +578,6 @@ def __init__(self, fig, rect,
579
578
right = rcParams ['ytick.right' ] and rcParams ['ytick.major.right' ],
580
579
which = 'major' )
581
580
582
- self ._in_init = False
583
-
584
581
def __getstate__ (self ):
585
582
# The renderer should be re-created by the figure, and then cached at
586
583
# that point.
@@ -612,11 +609,11 @@ def get_window_extent(self, *args, **kwargs):
612
609
def _init_axis (self ):
613
610
"move this out of __init__ because non-separable axes don't use it"
614
611
self .xaxis = maxis .XAxis (self )
615
- self .spines ['bottom' ].register_axis (self .xaxis , _init = True )
616
- self .spines ['top' ].register_axis (self .xaxis , _init = True )
612
+ self .spines ['bottom' ].register_axis (self .xaxis )
613
+ self .spines ['top' ].register_axis (self .xaxis )
617
614
self .yaxis = maxis .YAxis (self )
618
- self .spines ['left' ].register_axis (self .yaxis , _init = True )
619
- self .spines ['right' ].register_axis (self .yaxis , _init = True )
615
+ self .spines ['left' ].register_axis (self .yaxis )
616
+ self .spines ['right' ].register_axis (self .yaxis )
620
617
self ._update_transScale ()
621
618
622
619
def set_figure (self , fig ):
@@ -980,13 +977,10 @@ def cla(self):
980
977
xaxis_visible = self .xaxis .get_visible ()
981
978
yaxis_visible = self .yaxis .get_visible ()
982
979
983
- # Don't clear during __init__ because they're already been cleared by
984
- # their own __init__.
985
- if not self ._in_init :
986
- self .xaxis .cla ()
987
- self .yaxis .cla ()
988
- for name , spine in six .iteritems (self .spines ):
989
- spine .cla ()
980
+ self .xaxis .cla ()
981
+ self .yaxis .cla ()
982
+ for name , spine in six .iteritems (self .spines ):
983
+ spine .cla ()
990
984
991
985
self .ignore_existing_data_limits = True
992
986
self .callbacks = cbook .CallbackRegistry ()
0 commit comments