r""" Inspect an `~matplotlib.artist.Artist` class (using `.ArtistInspector`) and return information about its settable properties and their current values. Parameters ---------- artist : `~matplotlib.artist.Artist` or an iterable of `Artist`\s Returns ------- str
(artist)
| 1913 | |
| 1914 | |
| 1915 | def kwdoc(artist): |
| 1916 | r""" |
| 1917 | Inspect an `~matplotlib.artist.Artist` class (using `.ArtistInspector`) and |
| 1918 | return information about its settable properties and their current values. |
| 1919 | |
| 1920 | Parameters |
| 1921 | ---------- |
| 1922 | artist : `~matplotlib.artist.Artist` or an iterable of `Artist`\s |
| 1923 | |
| 1924 | Returns |
| 1925 | ------- |
| 1926 | str |
| 1927 | The settable properties of *artist*, as plain text if |
| 1928 | :rc:`docstring.hardcopy` is False and as an rst table (intended for |
| 1929 | use in Sphinx) if it is True. |
| 1930 | """ |
| 1931 | ai = ArtistInspector(artist) |
| 1932 | return ('\n'.join(ai.pprint_setters_rest(leadingspace=4)) |
| 1933 | if mpl.rcParams['docstring.hardcopy'] else |
| 1934 | 'Properties:\n' + '\n'.join(ai.pprint_setters(leadingspace=4))) |
| 1935 | |
| 1936 | # We defer this to the end of them module, because it needs ArtistInspector |
| 1937 | # to be defined. |
no test coverage detected
searching dependent graphs…