Skip to content

Commit

Permalink
make violin's orientation default to vertical
Browse files Browse the repository at this point in the history
  • Loading branch information
saranti committed May 14, 2024
1 parent f2b91b5 commit bb34576
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit bb34576

Please sign in to comment.