matplotlib 3.5.1

ParametersReturns
violin(self, vpstats, positions=None, vert=True, widths=0.5, showmeans=False, showextrema=True, showmedians=False)

Draw a violin plot for each column of vpstats. Each filled area extends to represent the entire data range, with optional lines at the mean, the median, the minimum, the maximum, and the quantiles values.

Parameters

vpstats : list of dicts

A list of dictionaries containing stats for each violin plot. Required keys are:

  • coords : A list of scalars containing the coordinates that the violin's kernel density estimate were evaluated at.

  • vals : A list of scalars containing the values of the kernel density estimate at each of the coordinates given in coords.

  • mean : The mean value for this violin's dataset.

  • median : The median value for this violin's dataset.

  • min : The minimum value for this violin's dataset.

  • max : The maximum value for this violin's dataset.

Optional keys are:

  • quantiles : A list of scalars containing the quantile values for this violin's dataset.

positions : array-like, default: [1, 2, ..., n]

The positions of the violins. The ticks and limits are automatically set to match the positions.

vert : bool, default: True.

If true, plots the violins vertically. Otherwise, plots the violins horizontally.

widths : array-like, default: 0.5

Either a scalar or a vector that sets the maximal width of each violin. The default is 0.5, which uses about half of the available horizontal space.

showmeans : bool, default: False

If true, will toggle rendering of the means.

showextrema : bool, default: True

If true, will toggle rendering of the extrema.

showmedians : bool, default: False

If true, will toggle rendering of the medians.

Returns

dict

A dictionary mapping each component of the violinplot to a list of the corresponding collection instances created. The dictionary has the following keys:

Drawing function for violin plots.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /matplotlib/axes/_axes.py#7948
type: <class 'function'>
Commit: