From 61c567546ce28b4d389419f3c98bed42803ab0d4 Mon Sep 17 00:00:00 2001 From: maxtaran2010 Date: Wed, 8 Jul 2026 12:31:51 +0300 Subject: [PATCH] fix: correct typos in docstrings and comments - facets/labelling.py: "Coerse" -> "Coerce" - _mpl/utils.py: "accross" -> "across" - _mpl/layout_manager/_composition_side_space.py: "accomodate" -> "accommodate" - _mpl/layout_manager/_plot_layout_items.py: "postion" -> "position" - _mpl/layout_manager/_plot_side_space.py: "accomodate" -> "accommodate" - scales/scale_datetime.py: "timdelta" -> "timedelta" - stats/stat_qq.py: "Caculate" -> "Calculate" - themes/theme.py: "propery" -> "property" - themes/themeable.py: "alignement" -> "alignment" (x2) Co-Authored-By: Claude Sonnet 4.6 --- plotnine/_mpl/layout_manager/_composition_side_space.py | 2 +- plotnine/_mpl/layout_manager/_plot_layout_items.py | 2 +- plotnine/_mpl/layout_manager/_plot_side_space.py | 2 +- plotnine/_mpl/utils.py | 2 +- plotnine/facets/labelling.py | 2 +- plotnine/scales/scale_datetime.py | 2 +- plotnine/stats/stat_qq.py | 2 +- plotnine/themes/theme.py | 2 +- plotnine/themes/themeable.py | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/plotnine/_mpl/layout_manager/_composition_side_space.py b/plotnine/_mpl/layout_manager/_composition_side_space.py index 77cfcb2961..c8cc33e9e3 100644 --- a/plotnine/_mpl/layout_manager/_composition_side_space.py +++ b/plotnine/_mpl/layout_manager/_composition_side_space.py @@ -452,7 +452,7 @@ def resize_gridspec(self): Apply the space calculations to the sub_gridspec After calling this method, the sub_gridspec will be appropriately - sized to accomodate the content of the annotations. + sized to accommodate the content of the annotations. """ gsparams = self.calculate_gridspec_params() self.sub_gridspec.update_params_and_artists(gsparams) diff --git a/plotnine/_mpl/layout_manager/_plot_layout_items.py b/plotnine/_mpl/layout_manager/_plot_layout_items.py index 2dffe1d72f..22073e3fef 100644 --- a/plotnine/_mpl/layout_manager/_plot_layout_items.py +++ b/plotnine/_mpl/layout_manager/_plot_layout_items.py @@ -1096,7 +1096,7 @@ def set_position( def _position_plot_tag(tag: Text, spaces: PlotSideSpaces): """ - Set the postion of the plot_tag + Set the position of the plot_tag """ theme = spaces.plot.theme panels_gs = spaces.plot._sub_gridspec diff --git a/plotnine/_mpl/layout_manager/_plot_side_space.py b/plotnine/_mpl/layout_manager/_plot_side_space.py index 081290251b..0d7166794f 100644 --- a/plotnine/_mpl/layout_manager/_plot_side_space.py +++ b/plotnine/_mpl/layout_manager/_plot_side_space.py @@ -1002,7 +1002,7 @@ def resize_gridspec(self): Apply the space calculations to the sub_gridspec After calling this method, the sub_gridspec will be appropriately - sized to accomodate the artists around the panels. + sized to accommodate the artists around the panels. """ gsparams = self.calculate_gridspec_params() self.sub_gridspec.update_params_and_artists(gsparams) diff --git a/plotnine/_mpl/utils.py b/plotnine/_mpl/utils.py index a656d831c8..d4f1018075 100644 --- a/plotnine/_mpl/utils.py +++ b/plotnine/_mpl/utils.py @@ -405,7 +405,7 @@ def horizontally_across_panel( self, text: Text, ha: HorizontalJustification | float ): """ - Horizontally Justify text accross the panel(s) width + Horizontally Justify text across the panel(s) width """ self.horizontally( text, ha, self.boundaries.panel_left, self.boundaries.panel_right diff --git a/plotnine/facets/labelling.py b/plotnine/facets/labelling.py index eeb09ebaeb..34c050788b 100644 --- a/plotnine/facets/labelling.py +++ b/plotnine/facets/labelling.py @@ -132,7 +132,7 @@ def as_labeller( multi_line: bool = True, ) -> labeller: """ - Coerse to labeller + Coerce to labeller Parameters ---------- diff --git a/plotnine/scales/scale_datetime.py b/plotnine/scales/scale_datetime.py index 8e338d7517..53df773713 100644 --- a/plotnine/scales/scale_datetime.py +++ b/plotnine/scales/scale_datetime.py @@ -65,7 +65,7 @@ class scale_datetime(scale_continuous): - `(0, timedelta(days=1))` - Expand lower and upper limits by 1 day. - `(1, 0)` - Expand lower and upper limits by 100%. - `(0, 0, 0, timedelta(hours=6))` - Expand upper limit by 6 hours. - - `(0, timedelta(minutes=5), 0.1, timdelta(0))` - Expand lower limit + - `(0, timedelta(minutes=5), 0.1, timedelta(0))` - Expand lower limit by 5 minutes and upper limit by 10%. - `(0, 0, 0.1, timedelta(weeks=2))` - Expand upper limit by 10% plus 2 weeks. diff --git a/plotnine/stats/stat_qq.py b/plotnine/stats/stat_qq.py index 4bfde5f81f..b9ff99850a 100644 --- a/plotnine/stats/stat_qq.py +++ b/plotnine/stats/stat_qq.py @@ -95,7 +95,7 @@ def theoretical_qq( distribution_params: dict[str, Any], ) -> FloatArray: """ - Caculate theoretical qq distribution + Calculate theoretical qq distribution """ from scipy.stats.mstats import plotting_positions diff --git a/plotnine/themes/theme.py b/plotnine/themes/theme.py index 74b47f3dc2..28191b41c7 100644 --- a/plotnine/themes/theme.py +++ b/plotnine/themes/theme.py @@ -305,7 +305,7 @@ def getp(self): def get_margin(self, name: str) -> margin: """ - Return the margin propery of a element_text themeables + Return the margin property of a element_text themeables """ return self.themeables.getp((name, "margin")) diff --git a/plotnine/themes/themeable.py b/plotnine/themes/themeable.py index 85c503b67e..f0e9420d57 100644 --- a/plotnine/themes/themeable.py +++ b/plotnine/themes/themeable.py @@ -386,7 +386,7 @@ def getp(self, key: str | tuple[str, str], default: Any = None) -> Any: def get_ha(self, name: str) -> float: """ - Get the horizontal alignement of themeable as a float + Get the horizontal alignment of themeable as a float The themeable should be and element_text """ @@ -398,7 +398,7 @@ def get_ha(self, name: str) -> float: def get_va(self, name) -> float: """ - Get the vertical alignement of themeable as a float + Get the vertical alignment of themeable as a float The themeable should be and element_text """