-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Need a way to check if an axis minor or major grid is on #19021
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'd guess the normal way to access that info would be I'm not sure I'd want a new method, though (what would we do if the user manually switched the visibility of only a subset of gridlines?). |
OK, that seems public enough to me. OTOH I don't see a way to get the minor gridlines from this? So maybe add a |
I guess just |
Some downstream packages use that approach: https://github.com/mwaskom/seaborn/blob/2717408b564994002fe08f72ba2dd7e1acf359b6/seaborn/distributions.py#L827...L830 IMO |
It appears we have no public interface to check whether the grid is on? Downstream libraries are now replacing the private
self.xaxis._gridOnMinor
with the privateself.xaxis._minor_tick_kw["gridOn"]
, which seems even worse.Seems we need
self.xaxis.grid_on(which='minor')
andself.xaxis.grid_on(which='major')
?Originally posted by @jklymak in #18769 (comment)
The text was updated successfully, but these errors were encountered: