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

Deprecate apply_theta_transforms=True to PolarTransform#24834

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 7 commits intomatplotlib:mainfromdstansby:_apply_theta_transforms
Jan 3, 2024

Conversation

dstansby
Copy link
Member

@dstansbydstansby commentedDec 28, 2022
edited
Loading

PR Summary

This parameter was introduced in#4699 for backwards compatabilty reasons, when shifting theta values was refactored out ofPolarTransform.

  • It think it's reasonable tonot expectPolarTransform to do a theta shift first
  • We do not currently test the case_apply_theta_transforms = True
  • Removing this will simplify the polar transform code slightly

So I think it's worth deprecating and eventually removing this.

PR Checklist

Documentation and Tests

  • Has pytest style unit tests (andpytest passes)
  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).
  • New plotting related features are documented with examples.

Release Notes

  • New features are marked with a.. versionadded:: directive in the docstring and documented indoc/users/next_whats_new/
  • API changes are marked with a.. versionchanged:: directive in the docstring and documented indoc/api/next_api_changes/
  • Release notes conform with instructions innext_whats_new/README.rst ornext_api_changes/README.rst

@dstansbydstansby added this to thev3.7.0 milestoneDec 28, 2022
@dstansbydstansby marked this pull request as draftDecember 28, 2022 23:14
@dstansbydstansby changed the titleDeprecate _apply_theta_transforms parameter to PolarTransformDeprecate _apply_theta_transforms=True to PolarTransformDec 28, 2022
@dstansbydstansbyforce-pushed the_apply_theta_transforms branch 4 times, most recently from6d7d585 to9bed666CompareJanuary 1, 2023 19:24
@anntzer
Copy link
Contributor

InvertedPolarTransform also needs this?

@tacaswelltacaswell modified the milestones:v3.7.0,v3.8.0Jan 5, 2023
@tacaswell
Copy link
Member

Pushing to 3.8 as I do not think this is critical to get in and is still draft. Please push back if I am incorrect@dstansby .

dstansby reacted with thumbs up emoji

@dstansbydstansbyforce-pushed the_apply_theta_transforms branch 2 times, most recently fromb1c7cf4 todeeb925CompareJanuary 10, 2023 15:38
@dstansbydstansbyforce-pushed the_apply_theta_transforms branch fromdeeb925 tob91198fCompareJanuary 15, 2023 17:52
@dstansbydstansbyforce-pushed the_apply_theta_transforms branch fromb91198f tob19f15eCompareJanuary 26, 2023 17:54
@dstansbydstansby marked this pull request as ready for reviewJanuary 26, 2023 17:54
@tacaswell
Copy link
Member

We talked about this on the call this week and we felt we did not have enough context to understand why we want to do this and concern about exposing an underscored arg name to the users.

There was also surprise about the claim that this was not tested given it is the default!

Do we want to make this public if we are going to document it like this? Should we just have a second class?

@jklymak
Copy link
Member

I guess the point is that a polar axes sets this to False, which is our internal use. So this would only affect power users who are using PolarTransform directly? OTOH, it seems we should have a public toggle for this, and document it?

@dstansby
Copy link
MemberAuthor

I think the original intention was to keep the 'version' of the class where no theta transform was applied private, but for backwards API compatability keep a version where a theta transform was applied. So I think making the argument public and going through a deprecation as is in this PR might be a reasonable way forward?

The motivation for this was to makePolarTransform internal code less complicated for maintenance reasons. I figured that there probably aren't lots of people out there using this, and there's a clear and simple alternative to_apply_theta_transforms=True (just add a theata value to the outputs), so it was worth doing.

@dstansbydstansby changed the titleDeprecate _apply_theta_transforms=True to PolarTransformDeprecate apply_theta_transforms=True to PolarTransformFeb 17, 2023
Copy link
Member

@jklymakjklymak left a comment

Choose a reason for hiding this comment

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

I think this is OK since this is probably only used by developers, if anyone. Maybe not the nicest dance, but improves maintainability.

Copy link
Member

@QuLogicQuLogic left a comment

Choose a reason for hiding this comment

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

This needs a rebase now.

To silence this warning and adopt future behaviour,
set ``apply_theta_transforms=False``. If you need to retain the behaviour
where theta values are transformed, chain the ``PolarTransform`` with
another transform that performs the theta shift and/or sign shift.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe add an example of which transform to use?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

👍 added a note that anAffine2D can be used to do this.

@ksundenksunden modified the milestones:v3.8.0,v3.9.0Aug 8, 2023
@dstansbydstansby marked this pull request as draftDecember 28, 2023 17:26
@dstansbydstansby marked this pull request as ready for reviewDecember 29, 2023 10:31
@QuLogicQuLogic merged commit8703dc5 intomatplotlib:mainJan 3, 2024
@dstansbydstansby deleted the _apply_theta_transforms branchJanuary 3, 2024 10:08
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@tacaswelltacaswelltacaswell left review comments

@QuLogicQuLogicQuLogic approved these changes

@jklymakjklymakjklymak approved these changes

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

Successfully merging this pull request may close these issues.

6 participants
@dstansby@anntzer@tacaswell@jklymak@QuLogic@ksunden

[8]ページ先頭

©2009-2025 Movatter.jp