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

If plot ranges cannot be determined use mpl autoscale view #578

Merged
merged 2 commits into from
Mar 30, 2016

Conversation

philippjfr
Copy link
Member

This ensures that the xlim and ylim on a plot correspond to the actual data limits at all times, allowing calculations based on these values to be performed.

if valid_lim(t):
axis.set_ylim(top=t)
yset = True
axis.autoscale_view(scalex=not xset, scaley=not yset)
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like a reasonable change although why not invert the booleans and use the same names as matplotlib scalex and scaley? That would seem clearer to me...

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed.

@philippjfr
Copy link
Member Author

Apparently some Spikes plots are affected by this, will have to investigate that before this can be merged.

This ensures that the xlim and ylim on a plot correspond to the
actual data limits at all times, allowing calculations based on
these values to be performed
@philippjfr philippjfr force-pushed the autoscale branch 3 times, most recently from da8a183 to 96a886c Compare March 29, 2016 16:16
@philippjfr
Copy link
Member Author

Ready to merge.

@philippjfr
Copy link
Member Author

Not sure why the reference data is complaining but this is still ready to merge.

@jlstevens
Copy link
Contributor

With the pr build passing, I'll merge it now.

@jlstevens jlstevens merged commit 4e6ca59 into master Mar 30, 2016
@philippjfr philippjfr deleted the autoscale branch April 1, 2016 14:25
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.

2 participants