You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PathCollection (and therefore Scatter) points are badly placed since v1.4 #7262
If you open both of these images in new tabs and flick between them, you will see the jitter that the above comment has introduced.
I'm reporting this as an investigation on behalf of @bjlittle. I'm not certain I'm going to get a huge amount of time to address this problem, but maybe some hints from @mdboom might enable @bjlittle to take a look at fixing the problem.
Reacted by Nico Schlömer, marko-pi and Juhan Oskar Hennoste
I have some issues installing 1.3 right now to check but I wonder whether this is the same issue as #7233. Can you give it a try and consolidate the two issues if this is the case?
diff --git a/lib/matplotlib/collections.py b/lib/matplotlib/collections.py
index 5997192..63aa9ec 100644
--- a/lib/matplotlib/collections.py+++ b/lib/matplotlib/collections.py@@ -328,7 +328,7 @@ class Collection(artist.Artist, cm.ScalarMappable):
extents.height < height):
do_single_path_optimization = True
- if do_single_path_optimization:+ if False and do_single_path_optimization:
gc.set_foreground(tuple(edgecolors[0]))
gc.set_linewidth(self._linewidths[0])
gc.set_dashes(*self._linestyles[0])
One other thing to notice is that in 1.4+ the (0, 0) marker is right on the intersection of the two grid lines, where as for 1.3.1 the marker is off by a bit.
I am pretty sure that the underlying problem is in draw_markers and related to snapping.
I'd suggest making the fast path optimization an rcParam -- and @tacaswell's code snippet above highlights exactly where to use it. There are good reasons to have it -- particularly for large point clouds in astronomy which is where it first came from. But clearly there are also good reasons not to have it.
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!
Activity
anntzer commentedon Oct 12, 2016
I have some issues installing 1.3 right now to check but I wonder whether this is the same issue as #7233. Can you give it a try and consolidate the two issues if this is the case?
Kojoley commentedon Oct 12, 2016
I think it is.
1.4.0

1.3.1

Kojoley commentedon Oct 12, 2016
I have to downgrade numpy to 1.6.0 to install matplotlib 1.3
tacaswell commentedon Oct 29, 2016
Disabling the fast-path does fix this
One other thing to notice is that in 1.4+ the (0, 0) marker is right on the intersection of the two grid lines, where as for 1.3.1 the marker is off by a bit.
I am pretty sure that the underlying problem is in
draw_markersand related to snapping.tacaswell commentedon Oct 29, 2016
attn @mdboom
mdboom commentedon Dec 5, 2016
I'd suggest making the fast path optimization an rcParam -- and @tacaswell's code snippet above highlights exactly where to use it. There are good reasons to have it -- particularly for large point clouds in astronomy which is where it first came from. But clearly there are also good reasons not to have it.
anntzer commentedon Feb 24, 2017
Turning off the fast path optimization does not solve #7624, so there may be multiple issues at hand here...
brunodigiorgi commentedon Mar 12, 2017
I noticed that plotting the markers one at a time solves this problem in my case:
github-actions commentedon Mar 31, 2023
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!