FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

DOC: Improve violin/violin_stats/violinplot docs by timhoffm · Pull Request #32428 · matplotlib/matplotlib · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
34 changes: 34 additions & 0 deletions lib/matplotlib/axes/_axes.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -9105,8 +9105,26 @@ def violinplot(self, dataset, positions=None, vert=None,

See Also
--------
.cbook.violin_stats : calculate statistical properties of a dataset for violin
plotting.
.Axes.violin : Draw a violin from pre-computed statistics.
boxplot : Draw a box and whisker plot.

Notes
-----
The following calls are identical ::

ax.violinplot()

and ::

from matplotlib.cbook import violin_stats

stats = violin_stats()
ax.violin(stats)

`.violin_stats` gives you more control of the statistical calculations than
`.violinplot`.
"""
vpstats = cbook.violin_stats(dataset, ("GaussianKDE", bw_method),
points=points, quantiles=quantiles)
Expand Down Expand Up @@ -9246,6 +9264,22 @@ def violin(self, vpstats, positions=None, vert=None,
Draw a violin plot from data instead of pre-computed statistics.
.cbook.violin_stats:
Calculate a *vpstats* dictionary from data, suitable for passing to violin.

Notes
-----
The following calls are identical ::

ax.violinplot()

and ::

from matplotlib.cbook import violin_stats

stats = violin_stats()
ax.violin(stats)

`.violin_stats` gives you more control of the statistical calculations than
`.violinplot`.
"""

# Statistical quantities to be plotted on the violins
Expand Down
Loading

Back | FazBrowse Home | New Git URL