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

Method set_arrowstyle

lib/matplotlib/patches.py:4527–4564  ·  view source on GitHub ↗

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

(self, arrowstyle=None, **kwargs)

Source from the content-addressed store, hash-verified

4525
4526 @_docstring.interpd
4527 def set_arrowstyle(self, arrowstyle=None, **kwargs):
4528 """
4529 Set the arrow style, possibly with further attributes.
4530
4531 Attributes from the previous arrow style are not reused.
4532
4533 Without argument (or with ``arrowstyle=None``), the available box
4534 styles are returned as a human-readable string.
4535
4536 Parameters
4537 ----------
4538 arrowstyle : str or `~matplotlib.patches.ArrowStyle`
4539 The style of the arrow: either a `.ArrowStyle` instance, or a
4540 string, which is the style name and optionally comma separated
4541 attributes (e.g. "Fancy,head_length=0.2"). Such a string is used to
4542 construct a `.ArrowStyle` object, as documented in that class.
4543
4544 The following arrow styles are available:
4545
4546 %(ArrowStyle:table_and_accepts)s
4547
4548 **kwargs
4549 Additional attributes for the arrow style. See the table above for
4550 supported parameters.
4551
4552 Examples
4553 --------
4554 ::
4555
4556 set_arrowstyle("Fancy,head_length=0.2")
4557 set_arrowstyle("fancy", head_length=0.2)
4558 """
4559 if arrowstyle is None:
4560 return ArrowStyle.pprint_styles()
4561 self._arrow_transmuter = (
4562 ArrowStyle(arrowstyle, **kwargs)
4563 if isinstance(arrowstyle, str) else arrowstyle)
4564 self.stale = True
4565
4566 def get_arrowstyle(self):
4567 """Return the arrowstyle object."""

Callers 2

__init__Method · 0.95
update_positionsMethod · 0.80

Calls 2

ArrowStyleClass · 0.85
pprint_stylesMethod · 0.80

Tested by

no test coverage detected