Bug summary
The vertices on certain markers ('^', 'D', 'v') are clipped when using plot() to plot data with more than two points and saving the plot as a PDF.
Code for reproduction
importmatplotlib.pyplotaspltsize=256, 16fig,ax=plt.subplots()
num=3fig,ax=plt.subplots()
ax.plot([i+1foriinrange(num)],[1foriinrange(num)], '^', markersize=3, markeredgewidth=0.7, color='green', markeredgecolor='black')
ax.set_xlim(0, num+1)
ax.set_xticks(())
ax.set_yticks(())
fig.savefig('test.pdf') # This doesn't work properly.fig.savefig('test.svg')
Actual outcome
The top image is of the marker from the .pdf file. The bottom image is of the marker from the .svg file.
Expected outcome
The marker in the .pdf file should look like the marker in the .svg file.
Activity
brunobeltran commented on Mar 12, 2020
#16719 has various details about why this is happening. I figured the discussion should remain on the older issue report, and closed my dup of it.
QuLogic commented on Mar 12, 2020
The fix for #16719 is quite straightforward, but I need to a) write some tests and b) verify it works on the other marker types correctly.
Fix clipping of markers in PDF backend.
Fix clipping of markers in PDF backend.
Fix clipping of markers in PDF backend.
Fix clipping of markers in PDF backend.
Fix clipping of markers in PDF backend.