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

Method get_setters

lib/matplotlib/artist.py:1594–1611  ·  view source on GitHub ↗

Get the attribute strings with setters for object. For example, for a line, return ``['markerfacecolor', 'linewidth', ....]``.

(self)

Source from the content-addressed store, hash-verified

1592 return source_class
1593
1594 def get_setters(self):
1595 """
1596 Get the attribute strings with setters for object.
1597
1598 For example, for a line, return ``['markerfacecolor', 'linewidth',
1599 ....]``.
1600 """
1601 setters = []
1602 for name in dir(self.o):
1603 if not name.startswith('set_'):
1604 continue
1605 func = getattr(self.o, name)
1606 if (not callable(func)
1607 or self.number_of_parameters(func) < 2
1608 or self.is_alias(func)):
1609 continue
1610 setters.append(name[4:])
1611 return setters
1612
1613 @staticmethod
1614 @cache

Callers 4

pprint_settersMethod · 0.95
pprint_setters_restMethod · 0.95
axis.pyFile · 0.80

Calls 2

number_of_parametersMethod · 0.95
is_aliasMethod · 0.95

Tested by

no test coverage detected