Skip to content
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

Set default axis limits in 2D-plots to the limits of the data #4815

Closed
TheExcalabur opened this issue Jul 29, 2015 · 6 comments
Closed

Set default axis limits in 2D-plots to the limits of the data #4815

TheExcalabur opened this issue Jul 29, 2015 · 6 comments

Comments

@TheExcalabur
Copy link

By default, pcolormesh and friends seem to not use tight boxes, leading to blank bars along the side or top of the figure depending on the range of values plotted. I see no positive results from this behaviour.

@tacaswell tacaswell added this to the Color overhaul milestone Jul 29, 2015
@shoyer
Copy link

shoyer commented Aug 4, 2015

This is also an issue for contour plots.

@Tillsten
Copy link
Contributor

Tillsten commented Oct 2, 2015

+1, always calling autoscale after contour & co should not be necessery.

@mdboom mdboom modified the milestones: Color overhaul, next major release (2.0) Oct 8, 2015
@mdboom
Copy link
Member

mdboom commented Nov 8, 2015

Related to #4891

@tacaswell
Copy link
Member

This is going to cause interesting interactions with using margins by default.

@efiring
Copy link
Member

efiring commented Nov 12, 2015

It sounds like this is a proposal for the default to execute what would need to be a new "tight" mode in Axes.autoscale_view. Presently, None triggers tight scaling if the artists include images but do not include lines or patches. If I understand correctly, the suggested alternative mode would trigger tight scaling if the artists include or result from any image-like elements (e.g. collections such as quadmesh, or LineCollection or PolyCollection from contour or contourf). This seems reasonable. In its simplest form it would not be difficult to implement: the judgment would be based exclusively on the artists without regard for how they were generated. An alternative would be to add an attribute to artists that would specify whether they should be treated as image-like for autoscaling purposes.

@tacaswell
Copy link
Member

This is handled in #5583

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

No branches or pull requests

6 participants