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

Data limits in scatter function #3481

Closed
wants to merge 1 commit into from

Conversation

cimarronm
Copy link
Contributor

Updates the data limits in a scatter plot with just the (x,y) input points. Currently, the scatter function creates a collection of markers which then are allowed to update the data limits. This has unintended consequences as seen in issue #3059.

…ints given as input and not using the scatter point's collections auto limits.
@@ -3657,7 +3657,8 @@ def scatter(self, x, y, s=20, c='b', marker='o', cmap=None, norm=None,
if self._ymargin < 0.05 and x.size > 0:
self.set_ymargin(0.05)

self.add_collection(collection)
self.add_collection(collection, autolim=False)
self.update_datalim(offsets)
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't make sense to me. What if transOffset is not transData? It seems like add_collection should be handling all this correctly, and if it isn't then that is what needs to be fixed, not the code in scatter.
My impression is that the problem is coming from the basic design of mpl, in which some variables are set, calculations are done, and then later changes in those variables are not taken into account. The only way around it is a major redesign in which a full dependency relationship is established, and the evaluation occurs only at the last moment.

@jenshnielsen
Copy link
Member

Tests are currently failing

@tacaswell tacaswell modified the milestones: v1.5.x, v1.4.x Feb 7, 2015
@tacaswell tacaswell modified the milestones: proposed next point release, next point release Feb 19, 2015
@tacaswell tacaswell modified the milestones: proposed next point release, next point release Jul 16, 2015
@tacaswell tacaswell modified the milestone: 2.1 (next point release) Aug 29, 2017
@jklymak
Copy link
Member

jklymak commented May 9, 2018

This seems to have been a dead-end. Thanks for the contribuiton - feel free to re-open if I'm misinterpreting!

@jklymak jklymak closed this May 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants