Skip to content

Commit

Permalink
Sanity check for ticklabelsize()
Browse files Browse the repository at this point in the history
  • Loading branch information
Ma-Fi-94 authored Dec 1, 2024
1 parent 0bf9ec0 commit f390d04
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions yaptool.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,9 @@ def ticklabelsize(ax: plt.Axes, which: str = "both", size: float = 30) -> None:
Returns:
None
"""
if not which in ["x", "y", "xy", "yx", "both"]:
raise ValueError(
'Parameter which must be one of "x", "y", "xy", "yx", "both".')

if not hasattr(ax, 'plot'):
raise ValueError("Pass a valid plot in parameter ax.")
Expand Down

0 comments on commit f390d04

Please sign in to comment.