BUGFIX: scatter should draw ',' as a single pixel #17367
Draft
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.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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_CollectionWithSizes
that 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 appropriatePath
toPathCollection
(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_marker
and producing two different results (off-by-one pixel).Test Cases
Output
(Screenshots from GIMP to make it more clear exactly what the error is)
plot
case (correctly one pixel):scatter
case currently in master (many pixels...):scatter
case in current PR (almost correct):PR Checklist