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

Move AxisArtistHelpers to toplevel.#20214

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
timhoffm merged 1 commit intomatplotlib:mainfromanntzer:aah
Apr 23, 2023
Merged

Conversation

anntzer
Copy link
Contributor

@anntzeranntzer commentedMay 12, 2021
edited
Loading

The axisartist has a concept of "axis_artist_helper", which computes
various computations to draw slanted/curved axises. Confusingly,
AxisArtistHelper (and likewiseAxisArtistHelperRectlinear) donot
define such helper classes; they are simply namespaces that hold the
{AxisArtistHelper,AxisArtistHelperRectlinear}.{Fixed,Floating} nested
classes whichdo define helpers. More specifically,
AxisArtistHelper.{Fixed,Floating} act as abstract base classes for
AxisArtistHelperRectlinear.{Fixed,Floating} which are actually usable.

In order to slightly disentangle this move the actual helper classes to
the toplevel (as_{Fixed,Floating}AxisArtistHelperBase and
_{Fixed,Floating}AxisArtistHelperRectlinear), keeping the old
"purely namespace" classes around for backcompat. (But note that end
users should never have to directly interact with these classes anyways
-- normally, they only construct GridHelpers which take care of the
interaction with AxisArtistHelpers; see e.g. the various axisartist
examples.)

More simply, this commit simply dedents most of the definitions of the
Helper classes.

PR Summary

PR Checklist

  • Has pytest style unit tests (andpytest passes).
  • IsFlake 8 compliant (runflake8 on changed files to check).
  • New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).
  • Conforms to Matplotlib style conventions (installflake8-docstrings and runflake8 --docstring-convention=all).
  • New features have an entry indoc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented indoc/api/next_api_changes/ (follow instructions in README.rst there).

@QuLogic
Copy link
Member

I'm not sure ifRectlinear belongs at the end of the name, or at the beginning, or afterFixed/Floating. It does seem a bit odd at the end though.

@anntzer
Copy link
ContributorAuthor

I'm just trying to be consistent with GridHelper, which puts them at the end. But I don't have a strong opinion either way...

@jklymakjklymak marked this pull request as draftMay 20, 2021 23:57
@anntzeranntzer marked this pull request as ready for reviewJanuary 3, 2022 15:19
@anntzer
Copy link
ContributorAuthor

Probably best to wait for#22314 and#24210 to be merged first before rebasing this.

@anntzer
Copy link
ContributorAuthor

Rebased on top of#22314.

@ksunden
Copy link
Member

Doc warnings are related to the change, namely that the subclasses have references to (new) superclasses which are private and undocumented. Perhaps can simply be added to the ignore list, but should be addressedsomehow

The axisartist has a concept of "axis_artist_helper", which computesvarious computations to draw slanted/curved axises.  Confusingly,`AxisArtistHelper` (and likewise `AxisArtistHelperRectlinear`) do *not*define such helper classes; they are simply namespaces that hold the`{AxisArtistHelper,AxisArtistHelperRectlinear}.{Fixed,Floating}` nestedclasses which *do* define helpers.  More specifically,`AxisArtistHelper.{Fixed,Floating}` act as abstract base classes for`AxisArtistHelperRectlinear.{Fixed,Floating}` which are actually usable.In order to slightly disentangle this move the actual helper classes tothe toplevel (as `_{Fixed,Floating}AxisArtistHelperBase` and`_{Fixed,Floating}AxisArtistHelperRectlinear`), keeping the old"purely namespace" classes around for backcompat.  (But note that endusers should never have to directly interact with these classes anyways-- normally, they only construct GridHelpers which take care of theinteraction with AxisArtistHelpers; see e.g. the various axisartistexamples.)More simply, this commit simply dedents most of the definitions of theHelper classes.
@anntzer
Copy link
ContributorAuthor

Fixed; the remaining doc build warning seems unrelated (failure to get the version switcher).

@timhoffmtimhoffm merged commitd77801e intomatplotlib:mainApr 23, 2023
@anntzeranntzer deleted the aah branchApril 23, 2023 21:41
@ksundenksunden added this to thev3.8.0 milestoneApr 25, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@QuLogicQuLogicQuLogic approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.8.0
Development

Successfully merging this pull request may close these issues.

4 participants
@anntzer@QuLogic@ksunden@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp