BUGFIX: scatter should draw ',' as a single pixel #17367
Draft
+13
−3
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.


PR Summary
Attempt to fix #11460.
Instead of adding a special case to
PathCollection, which (IMO, and I am happy to be told I'm wrong about this) has no business knowing that the path it's drawing came from a MarkerStyle at all, let alone that it came from the weird, special-case marker',', I added a kwarg to_CollectionWithSizesthat allows one to specify that the self-same sizes should actually just be ignored. With this in place,Axes.scatter(which does know that we are usingMarkerStyle) can pass the appropriatePathtoPathCollection(of width one) and ask the PathCollection to ignore the scaling information, which is what that particular marker is supposed to do, I think.WIP because I can't seem to figure out one last little issue, where what appear to be identical inputs are being sent to Agg's
draw_markerand producing two different results (off-by-one pixel).Test Cases
Output
(Screenshots from GIMP to make it more clear exactly what the error is)
plotcase (correctly one pixel):scattercase currently in master (many pixels...):scattercase in current PR (almost correct):PR Checklist
The text was updated successfully, but these errors were encountered: