-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Bug]: dotted line with "lw=0" breaks Adobe Acrobat Reader #24371
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
@ultimatile Does this reproduce with a newer version of Matplotlib? 3.1.0 is pretty old now and we have made a number of changes to the pdf backend. This does remind me of some performance issues we had with the dash pattern scaling with very thin lines because there ended up being way too many segments, however the failure mode of taking out the other lines is very odd. |
In 3.6.2 this now raises File /usr/lib/python3.10/site-packages/matplotlib/backend_bases.py:926, in GraphicsContextBase.set_dashes(self, dash_offset, dash_list)
923 raise ValueError(
924 "All values in the dash list must be non-negative")
925 if dl.size and not np.any(dl > 0.0):
--> 926 raise ValueError(
927 'At least one value in the dash list must be positive')
928 self._dashes = dash_offset, dash_list
ValueError: At least one value in the dash list must be positive I think at some point we "fixed" this by making it impossible to generate broken pdfs. @ultimatile are you OK if we close this? |
I'm going to go ahead a close this as it is no longer reproducible. @ultimatile If you can reproduce this with a newer version of Matplotlib please ping to have the re-opened or open a new issue! |
Thank you for your replies, and sorry for my late response. |
Bug summary
When a figure that uses
ls=":"
andlw=0
is saved as a pdf, it does not render correctly only in Adobe Acrobat Reader.Code for reproduction
Actual outcome
Adobe Acrobat Reader
Expected outcome
other pdf viewers
I tried Skim, Chrome, and Safari.

Additional information
Other line style keys, "-", "--" and "-." work fine.
It may be a related discussion.
#1188 (comment)
Operating system
macOS 10.15.7
Matplotlib Version
3.1.0
Matplotlib Backend
module://ipykernel.pylab.backend_inline, MacOSX
Python version
3.7.4
Jupyter version
6.0.1
Installation
conda
The text was updated successfully, but these errors were encountered: