Handle Tick gridline properties like other Tick properties#10193
Handle Tick gridline properties like other Tick properties#10193QuLogic merged 3 commits intomatplotlib:masterfrom
Conversation
This is a refactoring for internal and API consistency, so that Axis.set_tick_params can set all Tick properties. It also removes some redundant code involving attributes like isDefault_majloc.
| self._lastNumMinorTicks = 1 | ||
|
|
||
| try: | ||
| self.set_clip_path(self.axes.patch) |
There was a problem hiding this comment.
It's been such a pain having to remember to do this for polar plots, so I'm happy to see it centralized.
There was a problem hiding this comment.
OK, sorry to dredge this up:
This change is a bit strange because from a literal point of view most of the axis is drawn outside this clip_path. I was trying to short-circuit getting tightbboxes if the clip path was the axes, but with this change axis-es are marked as clipped to the axes. Which they aren't - only their gridlines are.
Not sure what the solution is, but wanted to point out that this is pretty confusing.
There was a problem hiding this comment.
This isn't exactly new though; it simply makes reset_ticks consistent with what happens in __init__ (admittedly, of the Axes, not the Tick).
PR Summary
This is a refactoring for internal and API consistency, so
that Axis.set_tick_params can set all Tick properties. It also
removes some redundant code involving attributes like isDefault_majloc.
This was originally included in #8752 and its successor, #10033. Although a slightly different version of it was integral to #8752, it is independent of what remains in #10033, so it is split out here for easier evaluation.
PR Checklist