Vertices clipped for certain markers when plotting more than two points and saving as pdf · Issue #9829 · matplotlib/matplotlib · GitHub
Skip to content

Vertices clipped for certain markers when plotting more than two points and saving as pdf #9829

Description

@nscottnichols

Bug report

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

import matplotlib.pyplot as plt
size = 256, 16
fig,ax = plt.subplots()
num = 3

fig,ax = plt.subplots()
ax.plot([i+1 for i in range(num)],[1 for i in range(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

pdfmarker
svgmarker

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.

Matplotlib version

  • Operating system: Ubuntu 17.04
  • Matplotlib version: 2.1.0
  • Matplotlib backend (print(matplotlib.get_backend())): TkAgg
  • Python version: Python 3.5.3
  • Jupyter version (if applicable):
  • Other libraries:

I installed matplotlib via pip.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions