Skip to content

Commit 8685efb

Browse files
committed
Fix typos
Found via `codespell -L inout,whis,vermillion,applys,ans` and `typos --hidden --format brief`
1 parent e7b8fda commit 8685efb

40 files changed

+84
-84
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ $ pip install 'plotnine[extra]' # 2. includes extra/optional packages
125125
$ pip install 'plotnine[test]' # 3. testing
126126
$ pip install 'plotnine[doc]' # 4. generating docs
127127
$ pip install 'plotnine[dev]' # 5. development (making releases)
128-
$ pip install 'plotnine[all]' # 6. everyting
128+
$ pip install 'plotnine[all]' # 6. everything
129129

130130
# Or using conda
131131
$ conda install -c conda-forge plotnine

doc/_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
EXAMPLES_DIR = DOC_DIR / "reference" / "examples"
1111
TUTORIALS_DIR = DOC_DIR / "tutorials"
1212

13-
# The varibables file holds the version
13+
# The variables file holds the version
1414
variables_filepath = DOC_DIR / "_variables.yml"
1515
VARIABLES_TPL = """\
1616
version: {version}

doc/changelog.qmd

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ title: Changelog
303303
- You can now pickle the drawn matplotlib figures. ({{< issue 729 >}})
304304

305305
- The facet titles in the `strip_text` are now better aligned are appear more
306-
centered withing the `strip_background`.
306+
centered within the `strip_background`.
307307

308308

309309
## v0.12.4
@@ -411,7 +411,7 @@ title: Changelog
411411
renamed to
412412
[](:class:`~plotnine.themes.themeable.strip_align`),
413413
[](:class:`~plotnine.themes.themeable.strip_align_x`)
414-
[](:class:`~plotnine.themes.themeable.strip_align_y`) repectively.
414+
[](:class:`~plotnine.themes.themeable.strip_align_y`) respectively.
415415

416416
- [](:class:`~plotnine.themes.themeable.subplots_adjust`) has been deprecated.
417417
You no longer need to use `theme(subplots_adjust={"right": 0.85})`{.py} and
@@ -475,7 +475,7 @@ not exist, got no description. This release is fixes error.
475475
### New Features
476476

477477
- [](:class:`~plotnine.geom_ribbon`) acquired new parameter `where`
478-
which can be used shade withing given limits .
478+
which can be used shade within given limits .
479479

480480
- Added support for objects with a `to_pandas` method to convert them to
481481
a pandas dataframe. You can now pass in [polars](https://pola.rs) dataframes.
@@ -490,7 +490,7 @@ not exist, got no description. This release is fixes error.
490490
- The automatic groups generated by the system and depending on the aesthetic
491491
mappings now only depend those aesthetics that have scales. This is more
492492
strict than has been, should affect very few cases of code that has been
493-
written and it should be less suprising to the users.
493+
written and it should be less surprising to the users.
494494

495495
- [](:class:`~plotnine.geom_area`) and [](:class:`~plotnine.geom_density`)
496496
now default to showing only the upper outline/boundary of the area.
@@ -604,7 +604,7 @@ not exist, got no description. This release is fixes error.
604604
for gaussian densities with no weights. This was probably a regression.
605605

606606
- [](:class:`~plotnine.geom_map`) can now draw MultiPoints,
607-
MultiLineStrings and MultiPolgons.
607+
MultiLineStrings and MultiPolygons.
608608

609609
- [](:class:`~plotnine.geom_text`) with `adjust_text` can now be used
610610
in more than one layer with good enough results.
@@ -717,7 +717,7 @@ not exist, got no description. This release is fixes error.
717717

718718
### API Changes
719719

720-
- Changed the default method of caculating bandwidth for all stats that
720+
- Changed the default method of calculating bandwidth for all stats that
721721
use kernel density estimation. The affected stats are
722722
[](:class:`~plotnine.stat_density`),
723723
[](:class:`~plotnine.stat_ydensity`), and
@@ -842,7 +842,7 @@ not exist, got no description. This release is fixes error.
842842
({{< issue 242 >}})
843843

844844
- Fixed bug in [](:class:`~plotnine.position_dodge`) where by bar plot
845-
could get thinner when facetting and useing `preserve = 'single'`.
845+
could get thinner when facetting and using `preserve = 'single'`.
846846
({{< issue 224 >}})
847847

848848
- Fixed bug in [](:class:`~plotnine.coord_trans`) where if the transformation
@@ -905,7 +905,7 @@ not exist, got no description. This release is fixes error.
905905
- The `width` of the boxplot can now be set irrespective of the stat.
906906

907907
- The mid-point color of [](:class:`~plotnine.scale_color_distiller`) now
908-
matches that of the trainned data.
908+
matches that of the trained data.
909909

910910
- The way in which layers are created has been refactored to give packages that
911911
that extend plotnine more flexibility in manipulating the layers.
@@ -952,7 +952,7 @@ not exist, got no description. This release is fixes error.
952952
- Fixed bug in [](:class:`~plotnine.geom_abline`) where passing the mapping as
953953
a keyword parameter lead to a wrong plot. ({{< issue 196 >}})
954954

955-
- Fixed issue where `minor_breaks` for tranformed scaled would have to be given
955+
- Fixed issue where `minor_breaks` for transformed scaled would have to be given
956956
in the transformed coordinates. Know they are given the data coordinates just
957957
like the major `breaks`.
958958

@@ -965,7 +965,7 @@ not exist, got no description. This release is fixes error.
965965
is controlled by the new `na_translate` option.
966966

967967
- The `minor_breaks` parameter for continuous scales can now be given as an
968-
integer. An integer is taken to controll the number of minor breaks between
968+
integer. An integer is taken to control the number of minor breaks between
969969
any set of major breaks.
970970

971971
## v0.4.0

plotnine/_mpl/_plot_side_space.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
]
4747

4848
# Note
49-
# Margins around the plot are specfied in figure coordinates
50-
# We interprete that value to be a fraction of the width. So along
49+
# Margins around the plot are specified in figure coordinates
50+
# We interpret that value to be a fraction of the width. So along
5151
# the vertical direction we multiply by W/H to get equal space
5252
# in both directions
5353

@@ -117,7 +117,7 @@ def _legend_size(self) -> TupleFloat2:
117117
"""
118118
Return size of legend in figure coordinates
119119
120-
We need this to accurately justify the legend by proprotional
120+
We need this to accurately justify the legend by proportional
121121
values e.g. 0.2, instead of just left, right, top, bottom &
122122
center.
123123
"""
@@ -477,7 +477,7 @@ def _calculate_panel_spacing_facet_grid(
477477
sw = theme.getp("panel_spacing_x")
478478
sh = theme.getp("panel_spacing_y") * W / H
479479

480-
# width and height of axes as fraction of figure width & heigt
480+
# width and height of axes as fraction of figure width & height
481481
w = ((spaces.right - spaces.left) - sw * (ncol - 1)) / ncol
482482
h = ((spaces.top - spaces.bottom) - sh * (nrow - 1)) / nrow
483483

@@ -511,7 +511,7 @@ def _calculate_panel_spacing_facet_wrap(
511511
# +ve: Away from the panel
512512
# 0: Top of the panel
513513
# -ve: Into the panel
514-
# Where values <= -1, put the strip completly into
514+
# Where values <= -1, put the strip completely into
515515
# the panel. We do not worry about larger -ves.
516516
strip_align_x = theme.getp("strip_align_x")
517517

@@ -527,7 +527,7 @@ def _calculate_panel_spacing_facet_wrap(
527527
sw += max_ylabels_width(pack)
528528
sw += max_yticks_width(pack)
529529

530-
# width and height of axes as fraction of figure width & heigt
530+
# width and height of axes as fraction of figure width & height
531531
w = ((spaces.right - spaces.left) - sw * (ncol - 1)) / ncol
532532
h = ((spaces.top - spaces.bottom) - sh * (nrow - 1)) / nrow
533533

plotnine/_mpl/_plotnine_tight_layout.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,24 +159,24 @@ def set_figure_artist_positions(
159159
if pack.plot_title:
160160
ha = theme.getp(("plot_title", "ha"))
161161
pack.plot_title.set_y(sides.t.edge("plot_title"))
162-
horizonally_align_text_with_panels(pack.plot_title, params, ha, pack)
162+
horizontally_align_text_with_panels(pack.plot_title, params, ha, pack)
163163

164164
if pack.plot_subtitle:
165165
ha = theme.getp(("plot_subtitle", "ha"))
166166
pack.plot_subtitle.set_y(sides.t.edge("plot_subtitle"))
167-
horizonally_align_text_with_panels(
167+
horizontally_align_text_with_panels(
168168
pack.plot_subtitle, params, ha, pack
169169
)
170170

171171
if pack.plot_caption:
172172
ha = theme.getp(("plot_caption", "ha"), "right")
173173
pack.plot_caption.set_y(sides.b.edge("plot_caption"))
174-
horizonally_align_text_with_panels(pack.plot_caption, params, ha, pack)
174+
horizontally_align_text_with_panels(pack.plot_caption, params, ha, pack)
175175

176176
if pack.axis_title_x:
177177
ha = theme.getp(("axis_title_x", "ha"), "center")
178178
pack.axis_title_x.set_y(sides.b.edge("axis_title_x"))
179-
horizonally_align_text_with_panels(pack.axis_title_x, params, ha, pack)
179+
horizontally_align_text_with_panels(pack.axis_title_x, params, ha, pack)
180180

181181
if pack.axis_title_y:
182182
va = theme.getp(("axis_title_y", "va"), "center")
@@ -187,7 +187,7 @@ def set_figure_artist_positions(
187187
set_legends_position(pack.legends, tparams, pack.figure)
188188

189189

190-
def horizonally_align_text_with_panels(
190+
def horizontally_align_text_with_panels(
191191
text: Text, params: GridSpecParams, ha: str | float, pack: LayoutPack
192192
):
193193
"""

plotnine/_mpl/patches.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class InsideStrokedRectangle(Rectangle):
8181
@artist.allow_rasterization
8282
def draw(self, renderer):
8383
"""
84-
Draw with the bounds of the rectangle adjusted to accomodate the stroke
84+
Draw with the bounds of the rectangle adjusted to accommodate the stroke
8585
"""
8686
x, y = self.xy
8787
w, h = self.get_width(), self.get_height()

plotnine/_utils/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ def ninteraction(df: pd.DataFrame, drop: bool = False) -> list[int]:
285285
Returns
286286
-------
287287
out : list
288-
Row asssignments.
288+
Row assignments.
289289
290290
Notes
291291
-----
@@ -548,7 +548,7 @@ def to_rgba(
548548
alpha: float | Sequence[float] | AnySeries,
549549
) -> Sequence[ColorType] | ColorType:
550550
"""
551-
Covert hex colors to rgba values.
551+
Convert hex colors to rgba values.
552552
553553
Parameters
554554
----------
@@ -585,7 +585,7 @@ def no_color(c):
585585

586586
def to_rgba_hex(c: ColorType, a: float) -> str:
587587
"""
588-
Conver rgb color to rgba hex value
588+
Convert rgb color to rgba hex value
589589
590590
If color c has an alpha channel, then alpha value
591591
a is ignored
@@ -1230,14 +1230,14 @@ def simple_table(
12301230

12311231
def no_init(default: T) -> T:
12321232
"""
1233-
Set defaut value of a dataclass field that will not be __init__ed
1233+
Set default value of a dataclass field that will not be __init__ed
12341234
"""
12351235
return field(init=False, default=default)
12361236

12371237

12381238
def no_init_mutable(default: T) -> T:
12391239
"""
1240-
Set defaut value of a dataclass field that will not be __init__ed
1240+
Set default value of a dataclass field that will not be __init__ed
12411241
"""
12421242
return field(init=False, default_factory=lambda: deepcopy(default))
12431243

plotnine/animation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def __draw_plots(
108108

109109
def initialise_artist_offsets(n: int):
110110
"""
111-
Initilise artists_offsets arrays to zero
111+
Initialise artists_offsets arrays to zero
112112
113113
Parameters
114114
----------

plotnine/coords/coord.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def setup_data(self, data: list[pd.DataFrame]) -> list[pd.DataFrame]:
4949
Parameters
5050
----------
5151
data :
52-
Data for alls Layer
52+
Data for all Layer
5353
5454
Returns
5555
-------

plotnine/data/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
faithfuld = pd.read_csv(DATA_DIR / "faithfuld.csv")
4444
faithful = pd.read_csv(DATA_DIR / "faithful.csv")
4545

46-
# For conveniece to the user, we set some columns in these
46+
# For convenience to the user, we set some columns in these
4747
# dataframes to categoricals.
4848
diamonds = pd.read_csv(DATA_DIR / "diamonds.csv")
4949
midwest = pd.read_csv(DATA_DIR / "midwest.csv")
@@ -288,7 +288,7 @@ def _process_categories():
288288
(https://www.uaf.edu/cfos/people/faculty/detail/kristen-gorman.php)
289289
and the [Palmer Station, Antarctica LTER](https://pallter.marine.rutgers.edu/).
290290
291-
Made conveniently availabe by
291+
Made conveniently available by
292292
[Alison Horst](https://github.com/allisonhorst/palmerpenguins/) to serve as
293293
a dataset exploration and visualisation.
294294
"""

plotnine/facets/labelling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def label_context(
9494
Returns
9595
-------
9696
out : str
97-
Contatenated label values (or pairs of variable names
97+
Concatenated label values (or pairs of variable names
9898
& values)
9999
"""
100100
if len(label_info) == 1:

plotnine/facets/layout.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def setup(self, layers: Layers, plot: ggplot):
5151
Create a layout for the panels
5252
5353
The layout is a dataframe that stores all the
54-
structual information about the panels that will
54+
structural information about the panels that will
5555
make up the plot. The actual layout depends on
5656
the type of facet.
5757

plotnine/geoms/geom_label.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
_params.update(
2323
{
2424
# boxstyle is one of
25-
# cirle, larrow, rarrow, round, round4,
25+
# circle, larrow, rarrow, round, round4,
2626
# roundtooth, sawtooth, square
2727
#
2828
# Documentation at matplotlib.patches.BoxStyle

plotnine/geoms/geom_raster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def draw_panel(
184184
yidx, xidx = nrow - y_pos - 1, x_pos
185185

186186
# Create and "color" the matrix.
187-
# Any gaps left whites (ones) colors pluse zero alpha values
187+
# Any gaps left whites (ones) colors plus zero alpha values
188188
# allows makes it possible to have a "neutral" interpolation
189189
# into the gaps when intervals are uneven.
190190
X = np.ones((nrow, ncol, 4))

plotnine/geoms/geom_rect.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def _rectangles_to_polygons(df: pd.DataFrame) -> pd.DataFrame:
107107
"""
108108
Convert rect data to polygons
109109
110-
Paramters
110+
Parameters
111111
---------
112112
df : dataframe
113113
Dataframe with *xmin*, *xmax*, *ymin* and *ymax* columns,
@@ -128,7 +128,7 @@ def _rectangles_to_polygons(df: pd.DataFrame) -> pd.DataFrame:
128128
ymax_idx = ~ymin_idx
129129

130130
# There are 2 x and 2 y values for each of xmin, xmax, ymin & ymax
131-
# The positions are as layed out in the indexing arrays
131+
# The positions are as laid out in the indexing arrays
132132
# x and y values
133133
x = np.empty(n * 4)
134134
y = np.empty(n * 4)

plotnine/geoms/geom_text.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def __init__(
186186
else:
187187
check_adjust_text()
188188

189-
# Accomodate the old names
189+
# Accommodate the old names
190190
if mapping and "hjust" in mapping:
191191
mapping["ha"] = mapping.pop("hjust")
192192

plotnine/guides/guide_colorbar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class guide_colorbar(guide):
5252

5353
alpha: Optional[float] = None
5454
"""
55-
Opacity (in the range `[0, 1]`) of the colorbar. The defualt
55+
Opacity (in the range `[0, 1]`) of the colorbar. The default
5656
`None`, is to use the opacity of the plot.
5757
"""
5858

@@ -284,7 +284,7 @@ def add_gradient_colorbar(
284284
if len(colors) == 1:
285285
colors = [colors[0], colors[0]]
286286

287-
# Number of horizontal egdes(breaks) in the grid
287+
# Number of horizontal edges(breaks) in the grid
288288
# No need to create more nbreak than colors, provided
289289
# no. of colors = no. of breaks = no. of cmap colors
290290
# the shading does a perfect interpolation

plotnine/guides/guide_legend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def create_geoms(self):
150150
will be used in the call to geom.
151151
"""
152152
# A layer either contributes to the guide, or it does not. The
153-
# guide entries may be ploted in the layers
153+
# guide entries may be plotted in the layers
154154
for l in self.plot_layers:
155155
exclude = set()
156156
if isinstance(l.show_legend, dict):

plotnine/iapi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class scale_view:
4141
scale: scale
4242
aesthetics: list[ScaledAestheticsName]
4343
name: Optional[str]
44-
# Trainned limits of the scale
44+
# Trained limits of the scale
4545
limits: ScaleLimits
4646
# Physical size of scale, including expansions
4747
range: CoordRange
@@ -53,7 +53,7 @@ class scale_view:
5353
@dataclass
5454
class range_view:
5555
"""
56-
Range information after trainning
56+
Range information after training
5757
"""
5858

5959
range: TupleFloat2

0 commit comments

Comments
 (0)