-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Vertices clipped for certain markers when plotting more than two points and saving as pdf #9829
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
#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. |
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. |
QuLogic
added a commit
to QuLogic/matplotlib
that referenced
this issue
Apr 17, 2020
The bbox only contains the points of the marker, but the line will extend outside by half the line width. This was handled before, except when the line is at an angle to the edge, as the edge is then wider than half a line width. The maximum is at 45°, or √2. This fixes corners on 'v', '^', '<', '>', 'p', 'h', 'H', 'D', 'd', 'X'. Fixes matplotlib#9829.
QuLogic
added a commit
to QuLogic/matplotlib
that referenced
this issue
Apr 17, 2020
The bbox only contains the points of the marker, but the line will extend outside by half the line width. This was handled before, except when the line is at an angle to the edge, as then the line outside is wider than half a line width. The maximum is at 45°, or √2. This fixes corners on 'v', '^', '<', '>', 'p', 'h', 'H', 'D', 'd', 'X'. Fixes matplotlib#9829.
2 tasks
QuLogic
added a commit
to QuLogic/matplotlib
that referenced
this issue
Apr 17, 2020
The bbox only contains the points of the marker, but the line will extend outside by half the line width, unless it's mitered. The PDF miter limit is 10, so pad by 5*line width (half the miter length). This fixes corners on 'v', '^', '<', '>', 'p', 'h', 'H', 'D', 'd', 'X'. Fixes matplotlib#9829.
anntzer
pushed a commit
to anntzer/matplotlib
that referenced
this issue
Jun 9, 2020
The bbox only contains the points of the marker, but the line will extend outside by half the line width, unless it's mitered. The PDF miter limit is 10, so pad by 5*line width (half the miter length). This fixes corners on 'v', '^', '<', '>', 'p', 'h', 'H', 'D', 'd', 'X'. Fixes matplotlib#9829.
QuLogic
added a commit
to QuLogic/matplotlib
that referenced
this issue
Jun 10, 2020
The bbox only contains the points of the marker, but the line will extend outside by half the line width, unless it's mitered. The PDF miter limit is 10, so pad by 5*line width (half the miter length). This fixes corners on 'v', '^', '<', '>', 'p', 'h', 'H', 'D', 'd', 'X'. Fixes matplotlib#9829.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
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.
Matplotlib version
print(matplotlib.get_backend())
): TkAggI installed matplotlib via pip.
The text was updated successfully, but these errors were encountered: