MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / set_boxstyle

Method set_boxstyle

lib/matplotlib/patches.py:4103–4140  ·  view source on GitHub ↗

Set the box style, possibly with further attributes. Attributes from the previous box style are not reused. Without argument (or with ``boxstyle=None``), the available box styles are returned as a human-readable string. Parameters ----------

(self, boxstyle=None, **kwargs)

Source from the content-addressed store, hash-verified

4101
4102 @_docstring.interpd
4103 def set_boxstyle(self, boxstyle=None, **kwargs):
4104 """
4105 Set the box style, possibly with further attributes.
4106
4107 Attributes from the previous box style are not reused.
4108
4109 Without argument (or with ``boxstyle=None``), the available box styles
4110 are returned as a human-readable string.
4111
4112 Parameters
4113 ----------
4114 boxstyle : str or `~matplotlib.patches.BoxStyle`
4115 The style of the box: either a `.BoxStyle` instance, or a string,
4116 which is the style name and optionally comma separated attributes
4117 (e.g. "Round,pad=0.2"). Such a string is used to construct a
4118 `.BoxStyle` object, as documented in that class.
4119
4120 The following box styles are available:
4121
4122 %(BoxStyle:table_and_accepts)s
4123
4124 **kwargs
4125 Additional attributes for the box style. See the table above for
4126 supported parameters.
4127
4128 Examples
4129 --------
4130 ::
4131
4132 set_boxstyle("Round,pad=0.2")
4133 set_boxstyle("round", pad=0.2)
4134 """
4135 if boxstyle is None:
4136 return BoxStyle.pprint_styles()
4137 self._bbox_transmuter = (
4138 BoxStyle(boxstyle, **kwargs)
4139 if isinstance(boxstyle, str) else boxstyle)
4140 self.stale = True
4141
4142 def get_boxstyle(self):
4143 """Return the boxstyle object."""

Callers 6

__init__Method · 0.95
__init__Method · 0.80
annotations.pyFile · 0.80
fancybox_demo.pyFile · 0.80
draw_textFunction · 0.80
draw_textFunction · 0.80

Calls 2

BoxStyleClass · 0.85
pprint_stylesMethod · 0.80

Tested by

no test coverage detected