FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Handle Tick gridline properties like other Tick properties by efiring · Pull Request #10193 · matplotlib/matplotlib · GitHub

Repository navigation

Handle Tick gridline properties like other Tick properties - #10193

Merged
QuLogic merged 3 commits into
matplotlib:masterfrom
efiring:gridline_properties
Jan 9, 2018
Merged

QuLogic merged 3 commits into
matplotlib:masterfrom
efiring:gridline_properties

Conversation

efiring commented Jan 8, 2018 •
edited
Loading

Copy link
Copy Markdown
Member

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

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

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.
efiring added a commit to efiring/matplotlib that referenced this pull request Jan 8, 2018
efiring changed the title WIP: Handle Tick gridline properties like other Tick properties Handle Tick gridline properties like other Tick properties Jan 8, 2018
tacaswell added this to the v2.2 milestone Jan 8, 2018
Comment thread lib/matplotlib/axis.py
self._lastNumMinorTicks = 1

try:
self.set_clip_path(self.axes.patch)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It's been such a pain having to remember to do this for polar plots, so I'm happy to see it centralized.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This isn't exactly new though; it simply makes reset_ticks consistent with what happens in __init__ (admittedly, of the Axes, not the Tick).

QuLogic merged commit e3690cb into matplotlib:master Jan 9, 2018
QuLogic modified the milestones: needs sorting, v2.2.0 Feb 12, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL