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

Method __init__

lib/matplotlib/artist.py:1496–1514  ·  view source on GitHub ↗

r""" Initialize the artist inspector with an `Artist` or an iterable of `Artist`\s. If an iterable is used, we assume it is a homogeneous sequence (all `Artist`\s are of the same type) and it is your responsibility to make sure this is so.

(self, o)

Source from the content-addressed store, hash-verified

1494 """
1495
1496 def __init__(self, o):
1497 r"""
1498 Initialize the artist inspector with an `Artist` or an iterable of
1499 `Artist`\s. If an iterable is used, we assume it is a homogeneous
1500 sequence (all `Artist`\s are of the same type) and it is your
1501 responsibility to make sure this is so.
1502 """
1503 if not isinstance(o, Artist):
1504 if np.iterable(o):
1505 o = list(o)
1506 if len(o):
1507 o = o[0]
1508
1509 self.oorig = o
1510 if not isinstance(o, type):
1511 o = type(o)
1512 self.o = o
1513
1514 self.aliasd = self.get_aliases()
1515
1516 def get_aliases(self):
1517 """

Callers

nothing calls this directly

Calls 1

get_aliasesMethod · 0.95

Tested by

no test coverage detected