domplotlib.plots

Custom plotting functions.

New in version 0.2.0.

Functions:

pie_from_tally(tally[, explode, percent, …])

Construct a pie chart from cawdrey.tally.Tally.

pie_from_tally(tally, explode=(), *, percent=False, reverse=False, autopct=None, **kwargs)[source]

Construct a pie chart from cawdrey.tally.Tally.

Parameters
  • tally (Tally[str])

  • explode (Collection[str]) – A list of key names to explode the segments for. Default ().

  • percent (bool) – If True, shows the percentage of each element out of the sum of all elements. Default False.

  • reverse (bool) – Order the wedges clockwise rather than anticlockwise.. Default False.

  • **kwargs – Other keyword arguments taken by matplotlib.axes.Axes.pie().

Return type

Tuple[List, …]

Returns

  • patches (list) – A sequence of matplotlib.patches.Wedge instances

  • texts (list) – A list of the label .Text instances.

  • autotexts (list) – A list of .Text instances for the numeric labels. This will only be returned if the parameter autopct is not None.

Overloads