Skip to content

Commit

Permalink
style: add spell checking
Browse files Browse the repository at this point in the history
  • Loading branch information
henryiii authored and andrzejnovak committed Jan 12, 2022
1 parent a6ef37a commit ecf61eb
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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$"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -146,7 +146,7 @@ You can compare yourself if the differences are meanigful below.
<img src="img/FontComp.png" width="400" />
</p>

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
Expand Down
2 changes: 1 addition & 1 deletion docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions src/mplhep/label.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion src/mplhep/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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%"
Expand Down

0 comments on commit ecf61eb

Please sign in to comment.