matplotlib.artist.ArtistInspector#
- classmatplotlib.artist.ArtistInspector(o)[source]#
Bases:
objectA helper class to inspect an
Artistand returninformation about its settable properties and their current values.Initialize the artist inspector with an
Artistor an iterable ofArtists. If an iterable is used, we assume it is a homogeneoussequence (allArtists are of the same type) and it is yourresponsibility to make sure this is so.- aliased_name(s)[source]#
Return 'PROPNAME or alias' ifs has an alias, else return 'PROPNAME'.
For example, for the line markerfacecolor property, which has analias, return 'markerfacecolor or mfc' and for the transformproperty, which does not, return 'transform'.
- aliased_name_rest(s,target)[source]#
Return 'PROPNAME or alias' ifs has an alias, else return 'PROPNAME',formatted for reST.
For example, for the line markerfacecolor property, which has analias, return 'markerfacecolor or mfc' and for the transformproperty, which does not, return 'transform'.
- get_aliases()[source]#
Get a dict mapping property fullnames to sets of aliases for each aliasin the
ArtistInspector.e.g., for lines:
{'markerfacecolor':{'mfc'},'linewidth':{'lw'},}
- get_setters()[source]#
Get the attribute strings with setters for object.
For example, for a line, return
['markerfacecolor','linewidth',....].
- get_valid_values(attr)[source]#
Get the legal arguments for the setter associated withattr.
This is done by querying the docstring of the setter for a line thatbegins with "ACCEPTS:" or ".. ACCEPTS:", and then by looking for anumpydoc-style documentation for the setter's first argument.
- pprint_setters(prop=None,leadingspace=2)[source]#
Ifprop isNone, return a list of strings of all settableproperties and their valid values.
Ifprop is notNone, it is a valid property name and thatproperty will be returned as a string of property : validvalues.