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

Method pprint_getters

lib/matplotlib/artist.py:1776–1789  ·  view source on GitHub ↗

Return the getters and actual values as list of strings.

(self)

Source from the content-addressed store, hash-verified

1774 return d
1775
1776 def pprint_getters(self):
1777 """Return the getters and actual values as list of strings."""
1778 lines = []
1779 for name, val in sorted(self.properties().items()):
1780 if getattr(val, 'shape', ()) != () and len(val) > 6:
1781 s = str(val[:6]) + '...'
1782 else:
1783 s = str(val)
1784 s = s.replace('\n', ' ')
1785 if len(s) > 50:
1786 s = s[:50] + '...'
1787 name = self.aliased_name(name)
1788 lines.append(f' {name} = {s}')
1789 return lines
1790
1791
1792def getp(obj, property=None):

Callers 1

getpFunction · 0.95

Calls 2

propertiesMethod · 0.95
aliased_nameMethod · 0.95

Tested by

no test coverage detected