8000 Data limits in scatter function by cimarronm · Pull Request #3481 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Data limits in scatter function #3481

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
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

self.autoscale_view()

return collection
Expand Down
0