Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
make violin's orientation default to vertical
  • Loading branch information
saranti committed May 14, 2024
commit bb3457656b36313551bede4e6be056c22ca3ace0
6 changes: 3 additions & 3 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -8371,7 +8371,7 @@ def violinplot(self, dataset, positions=None, vert=None,
The positions of the violins; i.e. coordinates on the x-axis for
vertical violins (or y-axis for horizontal violins).

vert : bool, default: True.
vert : bool, optional
.. deprecated:: 3.10
Use *orientation* instead.

Expand Down Expand Up @@ -8476,7 +8476,7 @@ def _kde_method(X, coords):

@_api.make_keyword_only("3.9", "vert")
def violin(self, vpstats, positions=None, vert=None,
orientation=None, widths=0.5, showmeans=False,
orientation='vertical', widths=0.5, showmeans=False,
showextrema=True, showmedians=False, side='both'):
"""
Draw a violin plot from pre-computed statistics.
Expand Down Expand Up @@ -8515,7 +8515,7 @@ def violin(self, vpstats, positions=None, vert=None,
The positions of the violins; i.e. coordinates on the x-axis for
vertical violins (or y-axis for horizontal violins).

vert : bool, default: True.
vert : bool, optional
.. deprecated:: 3.10
Use *orientation* instead.

Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/axes/_axes.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ class Axes(_AxesBase):
positions: ArrayLike | None = ...,
*,
vert: bool | None = ...,
orientation: Literal["vertical", "horizontal"] | None = ...,
orientation: Literal["vertical", "horizontal"] = ...,
widths: float | ArrayLike = ...,
showmeans: bool = ...,
showextrema: bool = ...,
Expand Down