diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e07b6686..a404cd3a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -58,3 +58,10 @@ repos: files: src additional_dependencies: [uhi~=0.3.0, numpy~=1.22.0] args: [--show-error-codes] + +- repo: https://github.com/codespell-project/codespell + rev: "v2.1.0" + hooks: + - id: codespell + args: ["-L", "hist,heros"] + exclude: "^examples/Examples.ipynb$" diff --git a/README.md b/README.md index e4e41fd6..25a5fcc1 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ hep.style.use({"font.sans-serif":'Comic Sans MS'}) # Notes ## Consistency \& Fonts -As it is ROOT does not come with any fonts and therefore relies on using system fonts. Therfore the font in a figure can be dependent on whether it was produced on OSX or PC. The default sans-serif font used is Helvetica, but it only comes with OSX, in Windows this will silently fallback to Arial. +As it is ROOT does not come with any fonts and therefore relies on using system fonts. Therefore the font in a figure can be dependent on whether it was produced on OSX or PC. The default sans-serif font used is Helvetica, but it only comes with OSX, in Windows this will silently fallback to Arial. ### License Both Helvetica and Arial are proprietary, which as far as fonts go means you can use it to create any text/graphics once you have the license, but you cannot redistribute the font files as part of other software. That means we cannot just package Helvetica with this to make sure everyone has the same font in plots. @@ -146,7 +146,7 @@ You can compare yourself if the differences are meanigful below.

-They are Tex Gyre Heros, Helvetica and Arial respecively. +They are Tex Gyre Heros, Helvetica and Arial respectively. ### Math Fonts - Math fonts are a separate set from regular fonts due to the amount of special characters diff --git a/docs/source/api.rst b/docs/source/api.rst index 324890a4..488d7b24 100644 --- a/docs/source/api.rst +++ b/docs/source/api.rst @@ -11,7 +11,7 @@ Primary functions. .. autofunction:: mplhep.hist2dplot -.. # List all modules when apropriately privatized +.. # List all modules when appropriately privatized .. automodule:: mplhep.plot :members: diff --git a/src/mplhep/label.py b/src/mplhep/label.py index f8884456..123004b9 100644 --- a/src/mplhep/label.py +++ b/src/mplhep/label.py @@ -44,7 +44,7 @@ def exp_text( Secondary experiment label, typically not-bold and smaller font-size. For example "Simulation" or "Preliminary" loc : int, optional - Label positon: + Label position: - 0 : Above axes, left aligned - 1 : Top left corner - 2 : Top left corner, multiline @@ -248,7 +248,7 @@ def exp_label( Parameters ---------- loc : int, optional - Label positon of ``exp_text`` label: + Label position of ``exp_text`` label: - 0 : Above axes, left aligned - 1 : Top left corner - 2 : Top left corner, multiline @@ -406,7 +406,7 @@ def savelabels( ] If supplied strings contain suffixes such as ".png" the names will be assumed to be absolute and will ignore ``fname``. - If current label contains "Simulation" this will be perserved. + If current label contains "Simulation" this will be preserved. """ if labels is None: labels = [ diff --git a/src/mplhep/plot.py b/src/mplhep/plot.py index 9f61e244..2ca3ecc2 100644 --- a/src/mplhep/plot.py +++ b/src/mplhep/plot.py @@ -438,7 +438,7 @@ def hist2dplot( Array of per-bin labels to display. If ``True`` will display numerical values cbar : bool, optional, default True - Draw a colorbar. In contrast to mpl behaviours the cbar axes is + Draw a colorbar. In contrast to mpl behaviors the cbar axes is appended in such a way that it doesn't modify the original axes width:height ratio. cbarsize : str or float, optional, default "7%"