@@ -481,7 +481,6 @@ def __init__(self, fig, rect,
481481 """ % {'scale' : ' | ' .join (
482482 [repr (x ) for x in mscale .get_scale_names ()])}
483483 martist .Artist .__init__ (self )
484- self ._in_init = True
485484 if isinstance (rect , mtransforms .Bbox ):
486485 self ._position = rect
487486 else :
@@ -579,8 +578,6 @@ def __init__(self, fig, rect,
579578 right = rcParams ['ytick.right' ] and rcParams ['ytick.major.right' ],
580579 which = 'major' )
581580
582- self ._in_init = False
583-
584581 def __getstate__ (self ):
585582 # The renderer should be re-created by the figure, and then cached at
586583 # that point.
@@ -612,11 +609,11 @@ def get_window_extent(self, *args, **kwargs):
612609 def _init_axis (self ):
613610 "move this out of __init__ because non-separable axes don't use it"
614611 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 )
617614 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 )
620617 self ._update_transScale ()
621618
622619 def set_figure (self , fig ):
@@ -980,13 +977,10 @@ def cla(self):
980977 xaxis_visible = self .xaxis .get_visible ()
981978 yaxis_visible = self .yaxis .get_visible ()
982979
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 ()
990984
991985 self .ignore_existing_data_limits = True
992986 self .callbacks = cbook .CallbackRegistry ()
0 commit comments