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

Change the description of Rectangle's xy parameter#17008

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
story645 merged 3 commits intomatplotlib:masterfromSidharthBansal:patch-2
Apr 3, 2020

Conversation

SidharthBansal
Copy link
Contributor

@SidharthBansalSidharthBansal commentedApr 2, 2020
edited
Loading

PR Summary

matplotlib.patches.Rectangle's first parameter, xy, is previously only documented for data plotting functions in which xy means left and bottom coordinates. However, in imshow(), the vertical axis's direction is inverted, and xy means left and top coordinates. See#15401.

In this PR, a fix is made to explain xy as starting coordinates so as to make it suitable for both cases
Closes#15433

PR Checklist

  • Has Pytest style unit tests
  • Code isFlake 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

matplotlib.patches.Rectangle's first parameter, xy, is previously only documented for data plotting functions in which xy means left and bottom coordinates. However, in imshow(), the vertical axis's direction is inverted, and xy means left and top coordinates. Seematplotlib#15401.In this PR, a fix is made to explain xy as starting coordinates so as to make it suitable for both casesClosesmatplotlib#15433Taken things frommatplotlib#15433.
@SidharthBansal
Copy link
ContributorAuthor

@timhoffm@anntzer@story645@tacaswell kindly review and suggest changes if any. I am just trying to complete some pending PRS from which contributors left. This will help me to learn about mpl :-)
Thanks

@SidharthBansal
Copy link
ContributorAuthor

I am not able to add reviewers' from lefthand side topmost panel. Can anyone give me access to add reviewers if possible?
Thanks
Sidharth

@QuLogic
Copy link
Member

I'm not sure I agree with this change, as what constitutes the anchor point of the rectangle?

@SidharthBansal
Copy link
ContributorAuthor

SidharthBansal commentedApr 3, 2020 via email

The leftmost bottommost point of the rectangle
On Fri, 3 Apr 2020, 6:13 am Elliott Sales de Andrade, < ***@***.***> wrote: I'm not sure I agree with this change, as what constitutes the anchor point of the rectangle? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#17008 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AFAAEQ5YBBOBX6PQROPISCTRKUWJPANCNFSM4L23OTGQ> .

@SidharthBansal
Copy link
ContributorAuthor

SidharthBansal commentedApr 3, 2020
edited
Loading

Kindly check#15401 (comment) and#15433

@timhoffm
Copy link
Member

timhoffm commentedApr 3, 2020
edited
Loading

Whetherxy is really the bottom left depends on the direction of the axis and the sign ofwidth andheight.

IMHO, it's correct to call it anchor point, but this needs more context:

The rectangle extends fromxy bywidth in x-direction and byheight in y-direction.

or

The rectangle extends fromxy[0] toxy[0] + width and fromxy[1] toxy[1] + height.

or similar. Please find a suitable wording yourself.

SidharthBansal and story645 reacted with thumbs up emoji

@SidharthBansal
Copy link
ContributorAuthor

Done! Thanks for a detailed explanation.

@SidharthBansal
Copy link
ContributorAuthor

SidharthBansal commentedApr 3, 2020 via email

Thanks@story645
On Fri, 3 Apr 2020, 9:22 pm hannah, ***@***.***> wrote: ***@***.**** approved this pull request. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#17008 (review)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AFAAEQ235XBCCP6JT7ULBZDRKYA3PANCNFSM4L23OTGQ> .

@story645
Copy link
Member

story645 commentedApr 3, 2020
edited
Loading

You need to fix the CI error (which is a flake error) before it can be merged though

SidharthBansal reacted with thumbs up emoji

@SidharthBansal
Copy link
ContributorAuthor

@story645 I have rectified the flake error. Kindly merge.

@story645story645 merged commita451e2c intomatplotlib:masterApr 3, 2020
@QuLogicQuLogic added this to thev3.3.0 milestoneApr 3, 2020
@timhoffmtimhoffm mentioned this pull requestApr 4, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@story645story645story645 approved these changes

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

Successfully merging this pull request may close these issues.

4 participants
@SidharthBansal@QuLogic@timhoffm@story645

[8]ページ先頭

©2009-2025 Movatter.jp