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

Autoscale for ax.arrow()#13788

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

Closed
liujordan wants to merge1 commit intomatplotlib:masterfromliujordan:master
Closed

Conversation

liujordan
Copy link

@liujordanliujordan commentedMar 29, 2019
edited
Loading

PR Summary

When ax.arrow() is called, a FancyArrow object is being added to the current axes as an artist and not a patch. So when autoscale_view is called, which loops through all Patches and scales the view based on the minimum and maximum of those, the FancyArrow isn't being considered.
The solution is a two-step process. First, we have to add the arrow as a Patch, and second, we have to call autoscale_view() after adding it on the axes.

Resolves#12712

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

@ImportanceOfBeingErnest
Copy link
Member

In view of#11350 I'd be interested to know what use case people have forax.arrow.

Copy link
Member

@dstansbydstansby left a comment

Choose a reason for hiding this comment

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

This looks good to me. For the test, instead of adding a new image (we try and avoid that) could you instead add a manual check that the axes limits change to include the arrow after the axes are autoscaled?

@teto
Copy link

teto commentedSep 1, 2019

Looking forward to this fix ! thanks

@tacaswelltacaswell modified the milestones:v3.2.0,v3.3.0Sep 5, 2019
@tacaswell
Copy link
Member

This will also need an API change note. There are likely users who are relying on thisnot auto-scaling and they need to be notified.

@tetoteto mentioned this pull requestSep 5, 2019
4 tasks
@teto
Copy link

@liujordan please don't give up ! I want your fix :p

@choyiny
Copy link
Contributor

Taking over from@liujordan. This was previously a student project at University of Toronto Scarborough with Dr. Anya Tafliovich (@atafliovich).

@choyiny
Copy link
Contributor

A major change I made was removing theautoscale call. From#13593, autoscale is now lazily applied.

Copy link
Contributor

@anntzeranntzer left a comment

Choose a reason for hiding this comment

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

Please remove the unused image file and squash your commits.

@anntzer
Copy link
Contributor

Looks like something went wrong with the rebase? :(

@choyiny
Copy link
Contributor

Trying to fix it now.

@choyinychoyiny mentioned this pull requestOct 8, 2019
6 tasks
@choyiny
Copy link
Contributor

I was unable to fix this branch, so restarted in another PR#15392

@jklymak
Copy link
Member

Closing for other pr

@jklymakjklymak closed thisOct 9, 2019
teto added a commit to teto/pymptcpanalyzer that referenced this pull requestOct 25, 2019
can trymptcpanalyzer -dDEBUG "plot dss examples/client_2_filtered.pcapng 1 --dest=Server" "quit"There is an issue with autoscaling not working because FancyArrows aredrawn as artists rather than patches seematplotlib/matplotlib#13788
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@anntzeranntzeranntzer requested changes

@dstansbydstansbydstansby requested changes

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

Successfully merging this pull request may close these issues.

Autoscale does not work for ax.arrow()
9 participants
@liujordan@ImportanceOfBeingErnest@teto@tacaswell@choyiny@anntzer@jklymak@dstansby@QuLogic

[8]ページ先頭

©2009-2025 Movatter.jp