Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Handle Tick gridline properties like other Tick properties#10193

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
QuLogic merged 3 commits intomatplotlib:masterfromefiring:gridline_properties
Jan 9, 2018

Conversation

efiring
Copy link
Member

@efiringefiring commentedJan 8, 2018
edited
Loading

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, sothat Axis.set_tick_params can set all Tick properties.  It alsoremoves some redundant code involving attributes like isDefault_majloc.
efiring added a commit to efiring/matplotlib that referenced this pull requestJan 8, 2018
@efiringefiring changed the titleWIP: Handle Tick gridline properties like other Tick propertiesHandle Tick gridline properties like other Tick propertiesJan 8, 2018
@tacaswelltacaswell added this to thev2.2 milestoneJan 8, 2018
@@ -793,9 +806,14 @@ def reset_ticks(self):
self._lastNumMajorTicks = 1
self._lastNumMinorTicks = 1

try:
self.set_clip_path(self.axes.patch)
Copy link
Member

Choose a reason for hiding this comment

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

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
Member

Choose a reason for hiding this comment

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

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
Member

Choose a reason for hiding this comment

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

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

jklymak reacted with thumbs up emoji
@QuLogicQuLogic merged commite3690cb intomatplotlib:masterJan 9, 2018
@QuLogicQuLogic modified the milestones:needs sorting,v2.2.0Feb 12, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@QuLogicQuLogicQuLogic approved these changes

@jklymakjklymakjklymak left review comments

@tacaswelltacaswelltacaswell approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v2.2.0
Development

Successfully merging this pull request may close these issues.

4 participants
@efiring@tacaswell@QuLogic@jklymak

[8]ページ先頭

©2009-2025 Movatter.jp