@@ -791,22 +791,27 @@ def set_xy(self, xy):
791791 self .stale = True
792792
793793 def set_width (self , w ):
794- "Set the width of the rectangle."
794+ """ Set the width of the rectangle."" "
795795 self ._width = w
796796 self ._update_x1 ()
797797 self .stale = True
798798
799799 def set_height (self , h ):
800- "Set the height of the rectangle."
800+ """ Set the height of the rectangle."" "
801801 self ._height = h
802802 self ._update_y1 ()
803803 self .stale = True
804804
805805 def set_bounds (self , * args ):
806806 """
807- Set the bounds of the rectangle.
807+ Set the bounds of the rectangle as *left*, *bottom*, *width*, *height*.
808+
809+ The values may be passed as separate parameters or as a tuple::
810+
811+ set_bounds(left, bottom, width, height)
812+ set_bounds((left, bottom, width, height))
808813
809- ACCEPTS: (left, bottom, width, height)
814+ .. ACCEPTS: (left, bottom, width, height)
810815 """
811816 if len (args ) == 1 :
812817 l , b , w , h = args [0 ]
@@ -2403,34 +2408,48 @@ def __init__(self, xy, width, height,
24032408 self .stale = True
24042409
24052410 @docstring .dedent_interpd
2406- def set_boxstyle (self , boxstyle = None , ** kw ):
2411+ def set_boxstyle (self , boxstyle = None , ** kwargs ):
24072412 """
24082413 Set the box style.
24092414
2410- *boxstyle* can be a string with boxstyle name with optional
2411- comma-separated attributes. Alternatively, the attrs can
2412- be provided as keywords::
2415+ Most box styles can be further configured using attributes.
2416+ Attributes from the previous box style are not reused.
24132417
2414- set_boxstyle("round,pad=0.2")
2415- set_boxstyle("round", pad=0.2)
2418+ Without argument (or with ``boxstyle=None``), the available box styles
2419+ are returned as a human-readable string.
24162420
2417- Old attrs simply are forgotten.
2421+ Parameters
2422+ ----------
2423+ boxstyle : str
2424+ The name of the box style. Optionally, followed by a comma and a
2425+ comma-separated list of attributes. The attributes may
2426+ alternatively be passed separately as keyword arguments.
24182427
2419- Without argument (or with *boxstyle* = None), it returns
2420- available box styles.
2428+ The following box styles are available:
24212429
2422- The following boxstyles are available:
2423- %(AvailableBoxstyles)s
2430+ %(AvailableBoxstyles)s
2431+
2432+ .. ACCEPTS: %(ListBoxstyles)s
2433+
2434+ **kwargs
2435+ Additional attributes for the box style. See the table above for
2436+ supported parameters.
2437+
2438+ Examples
2439+ --------
2440+ ::
2441+
2442+ set_boxstyle("round,pad=0.2")
2443+ set_boxstyle("round", pad=0.2)
24242444
2425- ACCEPTS: %(ListBoxstyles)s
24262445 """
24272446 if boxstyle is None :
24282447 return BoxStyle .pprint_styles ()
24292448
24302449 if isinstance (boxstyle , BoxStyle ._Base ) or callable (boxstyle ):
24312450 self ._bbox_transmuter = boxstyle
24322451 else :
2433- self ._bbox_transmuter = BoxStyle (boxstyle , ** kw )
2452+ self ._bbox_transmuter = BoxStyle (boxstyle , ** kwargs )
24342453 self .stale = True
24352454
24362455 def set_mutation_scale (self , scale ):
0 commit comments