Skip to content

Commit

Permalink
Turn off all minor ticks.
Browse files Browse the repository at this point in the history
  • Loading branch information
erykoff committed Nov 20, 2024
1 parent a99a673 commit 70f6c51
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
9 changes: 8 additions & 1 deletion skyproj/_skyproj.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,14 @@ def __init__(
warnings.warn("rcparams is deprecated as a keyword, and is now ignored. "
"Please use skyproj.ax.tick_params() to set tick label parameters.")

self._ax = fig.add_subplot(subspec, projection=crs)
with matplotlib.rc_context(
{
"xtick.minor.visible": False,
"ytick.minor.visible": False
},
):
self._ax = fig.add_subplot(subspec, projection=crs)

self._crs_orig = crs
self._reprojected = False

Expand Down
4 changes: 4 additions & 0 deletions skyproj/skyaxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,3 +578,7 @@ def update_projection(self, crs_new):
crs_new : `skyproj.SkyCRS`
"""
self.projection = crs_new

def minorticks_on(self):
"""This is a no-op; skyproj does not support minor ticks."""
warnings.warn("Skyproj does not support minor ticks.")

0 comments on commit 70f6c51

Please sign in to comment.