Thanks to visit codestin.com
Credit goes to github.com

Skip to content

issue#3934: Call autoscale_view() in add_patch() #3936

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

amitsaha
Copy link

Aiming to fix #3934

@tacaswell tacaswell added this to the v1.5.x milestone Dec 22, 2014
@tacaswell
Copy link
Member

Do any of the other add_* methods call autoscale? Auto-scaling is (I think) not a cheap operation and it is an intentional design decision to not call auto-scaling every time a patch is added.

I think if the user is reaching down to use 'low level' methods to add artists, it is the users responsibility to auto-scale the axes.

I am 👎 on merging this.

@amitsaha
Copy link
Author

@tacaswell thanks for looking into this. I don't think any other method does. I was just hoping that it would be the case, since for usual plotting operations, the axis are scaled automatically and thought of this patch on someone's suggestion (http://stackoverflow.com/a/26892390/59634).. Is plt.axis('scaled') the way to go about it then?

Is this officially documented somewhere - the design rationale for this? Thanks much.

@tacaswell
Copy link
Member

@mdboom @efiring Do you know if this is documented someplace?

This is vaguely related the auto-redraw issues when working with the OO api. The hierarchy needs some clean way (decorators, callbacks?, ??) to keep track of when possibly expensive operations (like redrawing, auto-scaling, ect) are done and do them once when the UI is idle for interactive use and only when explicitly called for scripting/embedding usage.

This is also related to some issues with getting different limits if you set log-scale before/after plotting with scatter.

Closing as while this is an issue, I don't think this is the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Axis limits default to (0.0, 1.0, 0.0, 1.0) with a Circle patch
2 participants