MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / violinplot

Method violinplot

lib/matplotlib/axes/_axes.py:8865–8996  ·  view source on GitHub ↗

Make a violin plot. Make a violin plot for each column of *dataset* or each vector in sequence *dataset*. Each filled area extends to represent the entire data range, with optional lines at the mean, the median, the minimum, the maximum, and user-specified

(self, dataset, positions=None, vert=None,
                   orientation='vertical', widths=0.5, showmeans=False,
                   showextrema=True, showmedians=False, quantiles=None,
                   points=100, bw_method=None, side='both',
                   facecolor=None, linecolor=None)

Source from the content-addressed store, hash-verified

8863 @_api.make_keyword_only("3.10", "vert")
8864 @_preprocess_data(replace_names=["dataset"])
8865 def violinplot(self, dataset, positions=None, vert=None,
8866 orientation='vertical', widths=0.5, showmeans=False,
8867 showextrema=True, showmedians=False, quantiles=None,
8868 points=100, bw_method=None, side='both',
8869 facecolor=None, linecolor=None):
8870 """
8871 Make a violin plot.
8872
8873 Make a violin plot for each column of *dataset* or each vector in
8874 sequence *dataset*. Each filled area extends to represent the
8875 entire data range, with optional lines at the mean, the median,
8876 the minimum, the maximum, and user-specified quantiles.
8877
8878 Parameters
8879 ----------
8880 dataset : 1D array or sequence of 1D arrays or 2D array
8881 The input data. Possible values:
8882
8883 - 1D array: A single violin is drawn.
8884 - sequence of 1D arrays: A violin is drawn for each array in the sequence.
8885 - 2D array: A violin is drawn for each column in the array.
8886
8887 Non-finite and masked values are ignored.
8888
8889 positions : array-like, default: [1, 2, ..., n]
8890 The positions of the violins; i.e. coordinates on the x-axis for
8891 vertical violins (or y-axis for horizontal violins).
8892
8893 vert : bool, optional
8894 .. deprecated:: 3.10
8895 Use *orientation* instead.
8896
8897 If this is given during the deprecation period, it overrides
8898 the *orientation* parameter.
8899
8900 If True, plots the violins vertically.
8901 If False, plots the violins horizontally.
8902
8903 orientation : {'vertical', 'horizontal'}, default: 'vertical'
8904 If 'horizontal', plots the violins horizontally.
8905 Otherwise, plots the violins vertically.
8906
8907 .. versionadded:: 3.10
8908
8909 widths : float or array-like, default: 0.5
8910 The maximum width of each violin in units of the *positions* axis.
8911 The default is 0.5, which is half the available space when using default
8912 *positions*.
8913
8914 showmeans : bool, default: False
8915 Whether to show the mean with a line.
8916
8917 showextrema : bool, default: True
8918 Whether to show extrema with a line.
8919
8920 showmedians : bool, default: False
8921 Whether to show the median with a line.
8922

Calls 1

violinMethod · 0.95