8000
Error in PDF backend, extra clipbox crops markers slightly #16719
Labels
Bug report
Bug summary
The PDF backend has different behavior than the rest of the backends when drawing "MarkerStyle" objects. It puts each marker into a group with a clip-path (a unit box in the local coordinates of the marker path, it seems like?)
This bug was likely not caught before because it looks like backend_pdf is just forcing
_joinstyle='bevel'
(which would still be inconsistent, but looks rather nice). This is not what's happening though, see below.No other backends appear to be affected. Error seems to be in the code that handles rendering lines specifically (lone markers not affected).
Code for reproduction
This is fine
But this is "clipped"
Actual outcome
The single marker looks the same in all files.

Whereas the markers on lines look different (notice the bevel'd edges below) in the PDF:

vs the PNG:

All PDF viewers that I have seem to agree the beveled edges should be there.
When Inkscape converts it to SVG, it has the following structure:
Expected outcome
They should all be the same.
Matplotlib version
print(matplotlib.get_backend())
): see aboveThe text was updated successfully, but these errors were encountered: