TransformedPatchPath, TransformedPath) # Note, matplotlib artists use the doc strings for set and get # methods to enable the introspection methods of setp and getp. Every # set_* method should have a docstring containing the line # # ACCEPTS: [ legal | values ] # # and aliases for setters and getters should have a docstring that # starts with 'alias for ', as in 'alias for set_somemethod' # # You may wonder why we use so much boiler-plate manually defining the # set_alias and get_alias functions, rather than using some clever # python trick. The answer is that I need to be able to manipulate # the docstring, and there is no clever way to do that in python 2.2, # as far as I can see - see # # https://mail.python.org/pipermail/python-list/2004-October/242925.html
""" Decorator for Artist.draw method. Provides routines that run before and after the draw call. The before and after functions are useful for changing artist-dependent renderer attributes or making other setup function calls, such as starting and flushing a mixed-mode renderer. """
# the axes class has a second argument inframe for its draw method. def draw_wrapper(artist, renderer, *args, **kwargs): renderer.start_filter()
finally: renderer.stop_filter(artist.get_agg_filter())
""" Abstract base class for someone who renders into a :class:`FigureCanvas`. """
# order of precedence when bulk setting/updating properties # via update. The keys should be property names and the values # integers
# Handle self.axes as a read-only property, as in Figure.
d = self.__dict__.copy() # remove the unpicklable remove method, this will get re-added on load # (by the axes) if the artist lives on an axes. d['stale_callback'] = None return d
""" Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with :meth:`matplotlib.axes.Axes.draw_idle`. Call :meth:`matplotlib.axes.Axes.relim` to update the axes limits if desired.
Note: :meth:`~matplotlib.axes.Axes.relim` will not see collections even if the collection was added to axes with *autolim* = True.
Note: there is no support for removing the artist's legend entry. """
# There is no method to set the callback. Instead the parent should # set the _remove_method attribute directly. This would be a # protected attribute if Python supported that sort of thing. The # callback has one parameter, which is the child to be removed. if self._remove_method is not None: self._remove_method(self) # clear stale callback self.stale_callback = None _ax_flag = False if hasattr(self, 'axes') and self.axes: # remove from the mouse hit list self.axes._mouseover_set.discard(self) # mark the axes as stale self.axes.stale = True # decouple the artist from the axes self.axes = None _ax_flag = True
if self.figure: self.figure = None if not _ax_flag: self.figure = True
else: raise NotImplementedError('cannot remove artist') # TODO: the fix for the collections relim problem is to move the # limits calculation into the artist itself, including the property of # whether or not the artist should affect the limits. Then there will # be no distinction between axes.add_line, axes.add_patch, etc. # TODO: add legend support
'Return *True* if units are set on the *x* or *y* axes' return False
"""For artists in an axes, if the xaxis has units support, convert *x* using xaxis unit type """
"""For artists in an axes, if the yaxis has units support, convert *y* using yaxis unit type """
def axes(self): """ The :class:`~matplotlib.axes.Axes` instance the artist resides in, or *None*. """
def axes(self, new_axes): and new_axes != self._axes): raise ValueError("Can not reset the axes. You are probably " "trying to re-use an artist in more than one " "Axes which is not supported")
def stale(self): """ If the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. """ return self._stale
def stale(self, val):
# if the artist is animated it does not take normal part in the # draw stack and is not expected to be drawn as part of the normal # draw loop (when not saving) so do not propagate this change return
""" Get the axes bounding box in display space. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0.
Be careful when using this function, the results will not update if the artist window extent of the artist changes. The extent can change due to any changes in the transform stack, such as changing the axes limits, the figure size, or the canvas used (as is done when saving a figure). This can lead to unexpected behavior where interactive figures will look fine on the screen, but will save incorrectly. """ return Bbox([[0, 0], [0, 0]])
""" Like `Artist.get_window_extent`, but includes any clipping.
Parameters ---------- renderer : `.RendererBase` instance renderer that will be used to draw the figures (i.e. ``fig.canvas.get_renderer()``)
Returns ------- bbox : `.BboxBase` containing the bounding box (in figure pixel co-ordinates). """
bbox = self.get_window_extent(renderer) if self.get_clip_on(): clip_box = self.get_clip_box() if clip_box is not None: bbox = Bbox.intersection(bbox, clip_box) clip_path = self.get_clip_path() if clip_path is not None and bbox is not None: clip_path = clip_path.get_fully_transformed_path() bbox = Bbox.intersection(bbox, clip_path.get_extents()) return bbox
""" Adds a callback function that will be called whenever one of the :class:`Artist`'s properties changes.
Returns an *id* that is useful for removing the callback with :meth:`remove_callback` later. """ oid = self._oid self._propobservers[oid] = func self._oid += 1 return oid
""" Remove a callback based on its *id*.
.. seealso::
:meth:`add_callback` For adding callbacks
""" try: del self._propobservers[oid] except KeyError: pass
""" Fire an event when property changed, calling all of the registered callbacks. """ func(self)
""" Returns *True* if :class:`Artist` has a transform explicitly set. """
""" Set the artist transform.
Parameters ---------- t : `.Transform` """
""" Return the :class:`~matplotlib.transforms.Transform` instance used by this artist. """ and hasattr(self._transform, '_as_mpl_transform')): self._transform = self._transform._as_mpl_transform(self.axes)
def hitlist(self, event): """ List the children of the artist which contain the mouse event *event*. """ L = [] try: hascursor, info = self.contains(event) if hascursor: L.append(self) except: import traceback traceback.print_exc() print("while checking", self.__class__)
for a in self.get_children(): L.extend(a.hitlist(event)) return L
""" Return a list of the child :class:`Artist`s this :class:`Artist` contains. """ return []
"""Test whether the artist contains the mouse event.
Returns the truth value and a dictionary of artist specific details of selection, such as which points are contained in the pick radius. See individual artists for details. """ if callable(self._contains): return self._contains(self, mouseevent) warnings.warn("'%s' needs 'contains' method" % self.__class__.__name__) return False, {}
""" Replace the contains test used by this artist. The new picker should be a callable function which determines whether the artist is hit by the mouse event::
hit, props = picker(artist, mouseevent)
If the mouse event is over the artist, return *hit* = *True* and *props* is a dictionary of properties you want returned with the contains test.
Parameters ---------- picker : callable """ self._contains = picker
""" Return the _contains test used by the artist, or *None* for default. """ return self._contains
'Return *True* if :class:`Artist` is pickable.' return (self.figure is not None and self.figure.canvas is not None and self._picker is not None)
""" Process pick event
each child artist will fire a pick event if *mouseevent* is over the artist and the artist has picker set """ # Pick self if self.pickable(): picker = self.get_picker() if callable(picker): inside, prop = picker(self, mouseevent) else: inside, prop = self.contains(mouseevent) if inside: self.figure.canvas.pick_event(mouseevent, self, **prop)
# Pick children for a in self.get_children(): # make sure the event happened in the same axes ax = getattr(a, 'axes', None) if (mouseevent.inaxes is None or ax is None or mouseevent.inaxes == ax): # we need to check if mouseevent.inaxes is None # because some objects associated with an axes (e.g., a # tick label) can be outside the bounding box of the # axes and inaxes will be None # also check that ax is None so that it traverse objects # which do no have an axes property but children might a.pick(mouseevent)
""" Set the epsilon for picking used by this artist
*picker* can be one of the following:
* *None*: picking is disabled for this artist (default)
* A boolean: if *True* then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist
* A float: if picker is a number it is interpreted as an epsilon tolerance in points and the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, e.g., the indices of the data within epsilon of the pick event
* A function: if picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event::
hit, props = picker(artist, mouseevent)
to determine the hit test. if the mouse event is over the artist, return *hit=True* and props is a dictionary of properties you want added to the PickEvent attributes.
Parameters ---------- picker : None or bool or float or callable """ self._picker = picker
"""Return the picker object used by this artist.""" return self._picker
def is_figure_set(self): """Returns whether the artist is assigned to a `.Figure`.""" return self.figure is not None
"""Returns the url."""
""" Sets the url for the artist.
Parameters ---------- url : str """
"""Returns the group id."""
""" Sets the (group) id for the artist.
Parameters ---------- gid : str """ self._gid = gid
""" Returns the snap setting which may be:
* True: snap vertices to the nearest pixel center
* False: leave vertices as-is
* None: (auto) If the path contains only rectilinear line segments, round to the nearest pixel center
Only supported by the Agg and MacOSX backends. """ else: return False
""" Sets the snap setting which may be:
* True: snap vertices to the nearest pixel center
* False: leave vertices as-is
* None: (auto) If the path contains only rectilinear line segments, round to the nearest pixel center
Only supported by the Agg and MacOSX backends.
Parameters ---------- snap : bool or None """
""" Returns the sketch parameters for the artist.
Returns ------- sketch_params : tuple or `None`
A 3-tuple with the following elements:
* `scale`: The amplitude of the wiggle perpendicular to the source line.
* `length`: The length of the wiggle along the line.
* `randomness`: The scale factor by which the length is shrunken or expanded.
May return `None` if no sketch parameters were set. """
""" Sets the sketch parameters.
Parameters ----------
scale : float, optional The amplitude of the wiggle perpendicular to the source line, in pixels. If scale is `None`, or not provided, no sketch filter will be provided.
length : float, optional The length of the wiggle along the line, in pixels (default 128.0)
randomness : float, optional The scale factor by which the length is shrunken or expanded (default 16.0)
.. ACCEPTS: (scale: float, length: float, randomness: float) """ if scale is None: self._sketch = None else: self._sketch = (scale, length or 128.0, randomness or 16.0) self.stale = True
"""Set the path effects.
Parameters ---------- path_effects : `.AbstractPathEffect` """ self._path_effects = path_effects self.stale = True
"""Return the `.Figure` instance the artist belongs to."""
""" Set the `.Figure` instance the artist belongs to.
Parameters ---------- fig : `.Figure` """ # if this is a no-op just return # if we currently have a figure (the case of both `self.figure` # and `fig` being none is taken care of above) we then user is # trying to change the figure an artist is associated with which # is not allowed for the same reason as adding the same instance # to more than one Axes raise RuntimeError("Can not put single artist in " "more than one figure")
""" Set the artist's clip `.Bbox`.
Parameters ---------- clipbox : `.Bbox` """
""" Set the artist's clip path, which may be:
- a :class:`~matplotlib.patches.Patch` (or subclass) instance; or - a :class:`~matplotlib.path.Path` instance, in which case a :class:`~matplotlib.transforms.Transform` instance, which will be applied to the path before using it for clipping, must be provided; or - ``None``, to remove a previously set clipping path.
For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to ``None``.
ACCEPTS: [(`~matplotlib.path.Path`, `.Transform`) | `.Patch` | None] """
path.get_transform()) path, transform = path
self._clippath = TransformedPath(path, transform) success = True self._clippath = path success = True self._clippath = path success = True
raise TypeError( "Invalid arguments to set_clip_path, of type {} and {}" .format(type(path).__name__, type(transform).__name__)) # This may result in the callbacks being hit twice, but guarantees they # will be hit at least once.
""" Return the alpha value used for blending - not supported on all backends """
"Return the artist's visiblity"
"Return the artist's animated state"
""" Return boolean flag, ``True`` if artist is included in layout calculations.
E.g. :doc:`/tutorials/intermediate/constrainedlayout_guide`, `.Figure.tight_layout()`, and ``fig.savefig(fname, bbox_inches='tight')``. """ return self._in_layout
'Return whether artist uses clipping'
'Return artist clipbox' return self.clipbox
'Return artist clip path'
''' Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. ''' if self._clippath is not None: return self._clippath.get_transformed_path_and_affine() return None, None
""" Set whether artist uses clipping.
When False artists will be visible out side of the axes which can lead to unexpected results.
Parameters ---------- b : bool """ # This may result in the callbacks being hit twice, but ensures they # are hit at least once
'Set the clip properly for the gc' else:
"""Return whether the artist is to be rasterized."""
""" Force rasterized (bitmap) drawing in vector backend output.
Defaults to None, which implies the backend's default behavior.
Parameters ---------- rasterized : bool or None """ warnings.warn("Rasterization of '%s' will be ignored" % self)
"""Return filter function to be used for agg filter."""
"""Set the agg filter.
Parameters ---------- filter_func : callable A filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array.
.. ACCEPTS: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array """ self._agg_filter = filter_func self.stale = True
'Derived classes drawing method' if not self.get_visible(): return self.stale = False
""" Set the alpha value used for blending - not supported on all backends.
Parameters ---------- alpha : float """
""" Set the artist's visibility.
Parameters ---------- b : bool """
""" Set the artist's animation state.
Parameters ---------- b : bool """ if self._animated != b: self._animated = b self.pchanged()
""" Set if artist is to be included in layout calculations, E.g. :doc:`/tutorials/intermediate/constrainedlayout_guide`, `.Figure.tight_layout()`, and ``fig.savefig(fname, bbox_inches='tight')``.
Parameters ---------- in_layout : bool """ self._in_layout = in_layout
""" Update this artist's properties from the dictionary *prop*. """ """Sorting out how to update property (setter or setattr).
Parameters ---------- k : str The name of property to update v : obj The value to assign to the property
Returns ------- ret : obj or None If using a `set_*` method return it's return, else None. """ # white list attributes we want to be able to update through # art.update, art.set, setp return setattr(self, k, v) else: raise AttributeError('Unknown property %s' % k)
"""Get the label used for this artist in the legend."""
""" Set the label to *s* for auto legend.
Parameters ---------- s : object *s* will be converted to a string by calling `str`. """ else:
"""Return the artist's zorder."""
""" Set the zorder for the artist. Artists with lower zorder values are drawn first.
Parameters ---------- level : float """ level = self.__class__.zorder
def sticky_edges(self): """ `x` and `y` sticky edge lists.
When performing autoscaling, if a data limit coincides with a value in the corresponding sticky_edges list, then no margin will be added--the view limit "sticks" to the edge. A typical usecase is histograms, where one usually expects no margin on the bottom edge (0) of the histogram.
This attribute cannot be assigned to; however, the `x` and `y` lists can be modified in place as needed.
Examples --------
>>> artist.sticky_edges.x[:] = (xmin, xmax) >>> artist.sticky_edges.y[:] = (ymin, ymax)
"""
'Copy properties from *other* to *self*.'
""" return a dictionary mapping property name -> value for all Artist props """ return ArtistInspector(self).properties()
"""A property batch setter. Pass *kwargs* to set properties. """ sorted(kwargs.items(), reverse=True, key=lambda x: (self._prop_order.get(x[0], 0), x[0])))
""" Find artist objects.
Recursively find all :class:`~matplotlib.artist.Artist` instances contained in self.
*match* can be
- None: return all objects contained in artist.
- function with signature ``boolean = match(artist)`` used to filter matches
- class instance: e.g., Line2D. Only return artists of class type.
If *include_self* is True (default), include self in the list to be checked for a match.
""" if match is None: # always return True def matchfunc(x): return True elif isinstance(match, type) and issubclass(match, Artist): def matchfunc(x): return isinstance(x, match) elif callable(match): matchfunc = match else: raise ValueError('match must be None, a matplotlib.artist.Artist ' 'subclass, or a callable')
artists = sum([c.findobj(matchfunc) for c in self.get_children()], []) if include_self and matchfunc(self): artists.append(self) return artists
""" Get the cursor data for a given event. """ return None
""" Return *cursor data* string formatted. """ try: data[0] except (TypeError, IndexError): data = [data] data_str = ', '.join('{:0.3g}'.format(item) for item in data if isinstance(item, (np.floating, np.integer, int, float))) return "[" + data_str + "]"
def mouseover(self):
def mouseover(self, val): val = bool(val) self._mouseover = val ax = self.axes if ax: if val: ax._mouseover_set.add(self) else: ax._mouseover_set.discard(self)
""" A helper class to inspect an `~matplotlib.artist.Artist` and return information about its settable properties and their current values. """
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 `Artists` are of the same type) and it is your responsibility to make sure this is so. """ o = list(o) if len(o): o = o[0]
o = type(o)
""" Get a dict mapping property fullnames to sets of aliases for each alias in the :class:`~matplotlib.artist.ArtistInspector`.
e.g., for lines::
{'markerfacecolor': {'mfc'}, 'linewidth' : {'lw'}, } """ if name.startswith(('set_', 'get_')) and callable(getattr(self.o, name))] func.__doc__).group(1)
r"\n\s*(?:\.\.\s+)?ACCEPTS:\s*((?:.|\n)*?)(?:$|(?:\n\n))" )
""" Get the legal arguments for the setter associated with *attr*.
This is done by querying the docstring of the function *set_attr* for a line that begins with "ACCEPTS" or ".. ACCEPTS":
e.g., for a line linestyle, return "[ ``'-'`` | ``'--'`` | ``'-.'`` | ``':'`` | ``'steps'`` | ``'None'`` ]" """
raise AttributeError('%s has no function %s' % (self.o, name))
return None
# Much faster than list(inspect.signature(func).parameters)[1], # although barely relevant wrt. matplotlib's total import time.
""" Get the attribute strings and a full path to where the setter is defined for all setters in an object. """
continue continue
""" Changes the full path to the public API path that is used in sphinx. This is needed for links to work. """
'_axes.Axes': 'Axes'}
""" Get the attribute strings with setters for object. e.g., for a line, return ``['markerfacecolor', 'linewidth', ....]``. """
""" Return *True* if method object *o* is an alias for another function. """
""" return 'PROPNAME or alias' if *s* has an alias, else return PROPNAME.
e.g., for the line markerfacecolor property, which has an alias, return 'markerfacecolor or mfc' and for the transform property, which does not, return 'transform' """
return s + ''.join([' or %s' % x for x in sorted(self.aliasd[s])]) else:
""" return 'PROPNAME or alias' if *s* has an alias, else return PROPNAME formatted for ReST
e.g., for the line markerfacecolor property, which has an alias, return 'markerfacecolor or mfc' and for the transform property, which does not, return 'transform' """
if s in self.aliasd: aliases = ''.join([' or %s' % x for x in sorted(self.aliasd[s])]) else: aliases = '' return ':meth:`%s <%s>`%s' % (s, target, aliases)
""" If *prop* is *None*, return a list of strings of all settable properties and their valid values.
If *prop* is not *None*, it is a valid property name and that property will be returned as a string of property : valid values. """ else: pad = '' accepts = self.get_valid_values(prop) return '%s%s: %s' % (pad, prop, accepts)
""" If *prop* is *None*, return a list of strings of all settable properties and their valid values. Format the output for ReST
If *prop* is not *None*, it is a valid property name and that property will be returned as a string of property : valid values. """ if leadingspace: pad = ' ' * leadingspace else: pad = '' if prop is not None: accepts = self.get_valid_values(prop) return '%s%s: %s' % (pad, prop, accepts)
attrs = self._get_setters_and_targets() attrs.sort() lines = []
######## names = [self.aliased_name_rest(prop, target) for prop, target in attrs] accepts = [self.get_valid_values(prop) for prop, target in attrs]
col0_len = max(len(n) for n in names) col1_len = max(len(a) for a in accepts)
lines.append('') lines.append(pad + '.. table::') lines.append(pad + ' :class: property-table') pad += ' '
table_formatstr = pad + '=' * col0_len + ' ' + '=' * col1_len
lines.append('') lines.append(table_formatstr) lines.append(pad + 'Property'.ljust(col0_len + 3) + 'Description'.ljust(col1_len)) lines.append(table_formatstr)
lines.extend([pad + n.ljust(col0_len + 3) + a.ljust(col1_len) for n, a in zip(names, accepts)])
lines.append(table_formatstr) lines.append('') return lines
""" return a dictionary mapping property name -> value """ o = self.oorig getters = [name for name in dir(o) if name.startswith('get_') and callable(getattr(o, name))] getters.sort() d = dict() for name in getters: func = getattr(o, name) if self.is_alias(func): continue
try: with warnings.catch_warnings(): warnings.simplefilter('ignore') val = func() except: continue else: d[name[4:]] = val
return d
""" Return the getters and actual values as list of strings. """
lines = [] for name, val in sorted(self.properties().items()): if getattr(val, 'shape', ()) != () and len(val) > 6: s = str(val[:6]) + '...' else: s = str(val) s = s.replace('\n', ' ') if len(s) > 50: s = s[:50] + '...' name = self.aliased_name(name) lines.append(' %s = %s' % (name, s)) return lines
""" Return the value of object's property. *property* is an optional string for the property you want to return
Example usage::
getp(obj) # get all the object properties getp(obj, 'linestyle') # get the linestyle property
*obj* is a :class:`Artist` instance, e.g., :class:`~matplotllib.lines.Line2D` or an instance of a :class:`~matplotlib.axes.Axes` or :class:`matplotlib.text.Text`. If the *property* is 'somename', this function returns
obj.get_somename()
:func:`getp` can be used to query all the gettable properties with ``getp(obj)``. Many properties have aliases for shorter typing, e.g. 'lw' is an alias for 'linewidth'. In the output, aliases and full property names will be listed as:
property or alias = value
e.g.:
linewidth or lw = 2 """ if property is None: insp = ArtistInspector(obj) ret = insp.pprint_getters() print('\n'.join(ret)) return
func = getattr(obj, 'get_' + property) return func()
# alias
""" Set a property on an artist object.
matplotlib supports the use of :func:`setp` ("set property") and :func:`getp` to set and get object properties, as well as to do introspection on the object. For example, to set the linestyle of a line to be dashed, you can do::
>>> line, = plot([1,2,3]) >>> setp(line, linestyle='--')
If you want to know the valid types of arguments, you can provide the name of the property you want to set without a value::
>>> setp(line, 'linestyle') linestyle: [ '-' | '--' | '-.' | ':' | 'steps' | 'None' ]
If you want to see all the properties that can be set, and their possible values, you can do::
>>> setp(line) ... long output listing omitted
You may specify another output file to `setp` if `sys.stdout` is not acceptable for some reason using the `file` keyword-only argument::
>>> with fopen('output.log') as f: >>> setp(line, file=f)
:func:`setp` operates on a single instance or a iterable of instances. If you are in query mode introspecting the possible values, only the first instance in the sequence is used. When actually setting values, all the instances will be set. e.g., suppose you have a list of two lines, the following will make both lines thicker and red::
>>> x = arange(0,1.0,0.01) >>> y1 = sin(2*pi*x) >>> y2 = sin(4*pi*x) >>> lines = plot(x, y1, x, y2) >>> setp(lines, linewidth=2, color='r')
:func:`setp` works with the MATLAB style string/value pairs or with python kwargs. For example, the following are equivalent::
>>> setp(lines, 'linewidth', 2, 'color', 'r') # MATLAB style >>> setp(lines, linewidth=2, color='r') # python style """
if isinstance(obj, Artist): objs = [obj] else: objs = list(cbook.flatten(obj))
if not objs: return
insp = ArtistInspector(objs[0])
# file has to be popped before checking if kwargs is empty printArgs = {} if 'file' in kwargs: printArgs['file'] = kwargs.pop('file')
if not kwargs and len(args) < 2: if args: print(insp.pprint_setters(prop=args[0]), **printArgs) else: print('\n'.join(insp.pprint_setters()), **printArgs) return
if len(args) % 2: raise ValueError('The set args must be string, value pairs')
# put args into ordereddict to maintain order funcvals = OrderedDict((k, v) for k, v in zip(args[::2], args[1::2])) ret = [o.update(funcvals) for o in objs] + [o.set(**kwargs) for o in objs] return list(cbook.flatten(ret))
r""" Inspect an `~matplotlib.artist.Artist` class and return information about its settable properties and their current values.
It use the class `.ArtistInspector`.
Parameters ---------- artist : `~matplotlib.artist.Artist` or an iterable of `Artist`\s
Returns ------- string Returns a string with a list or rst table with the settable properties of the *artist*. The formating depends on the value of :rc:`docstring.hardcopy`. False result in a list that is intended for easy reading as a docstring and True result in a rst table intended for rendering the documentation with sphinx. """ return '\n'.join(ArtistInspector(artist).pprint_setters_rest( leadingspace=4)) else: leadingspace=2))
|