@@ -675,7 +675,7 @@ def __init__(self, ax, label, initial='',
675675
676676 hovercolor : color
677677 The color of the box when the mouse is over it
678-
678+
679679 label_pad : float
680680 the distance between the label and the right side of the textbox
681681 """
@@ -717,7 +717,7 @@ def __init__(self, ax, label, initial='',
717717 self .connect_event ('key_press_event' , self ._keypress )
718718 self .connect_event ('resize_event' , self ._resize )
719719 ax .set_navigate (False )
720- ax .set_axis_bgcolor (color )
720+ ax .set_facecolor (color )
721721 ax .set_xticks ([])
722722 ax .set_yticks ([])
723723 self .color = color
@@ -808,9 +808,9 @@ def _keypress(self, event):
808808 if key == "enter" :
809809 self ._notify_submit_observers ()
810810
811- def set_val (self ,val ):
811+ def set_val (self , val ):
812812 newval = str (val )
813- if self .text == newval :
813+ if self .text == newval :
814814 return
815815 self .text = newval
816816 self .text_disp .remove ()
@@ -825,8 +825,8 @@ def _notify_change_observers(self):
825825
826826 def begin_typing (self , x ):
827827 self .capturekeystrokes = True
828- #disable command keys so that the user can type without
829- #command keys causing figure to be saved, etc
828+ # disable command keys so that the user can type without
829+ # command keys causing figure to be saved, etc
830830 self .reset_params = {}
831831 for key in self .params_to_disable :
832832 self .reset_params [key ] = rcParams [key ]
@@ -838,8 +838,8 @@ def stop_typing(self):
838838 # user's code, we only want to call it once we've already done
839839 # our cleanup.
840840 if self .capturekeystrokes :
841- #since the user is no longer typing,
842- #reactivate the standard command keys
841+ # since the user is no longer typing,
842+ # reactivate the standard command keys
843843 for key in self .params_to_disable :
844844 rcParams [key ] = self .reset_params [key ]
845845 notifysubmit = True
@@ -850,8 +850,8 @@ def stop_typing(self):
850850 self ._notify_submit_observers ()
851851
852852 def position_cursor (self , x ):
853- #now, we have to figure out where the cursor goes.
854- #approximate it based on assuming all characters the same length
853+ # now, we have to figure out where the cursor goes.
854+ # approximate it based on assuming all characters the same length
855855 if len (self .text ) == 0 :
856856 self .cursor_index = 0
857857 else :
@@ -901,7 +901,7 @@ def _motion(self, event):
901901 else :
902902 c = self .color
903903 if c != self ._lastcolor :
904- self .ax .set_axis_bgcolor (c )
904+ self .ax .set_facecolor (c )
905905 self ._lastcolor = c
906906 if self .drawon :
907907 self .ax .figure .canvas .draw ()
0 commit comments