-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
"ValueError: All values in the dash list must be positive" if linewidth is set to zero in matplotlib 2.x.x #8821
Comments
This is due to scaling the dash pattern with linewidth. In 2.0.0 this scaling was clamped, in 2.0.1 or 2.0.2 (I don't remember) we removed the clamp and now lw=0 will scale the dash patterns also to 0 and hence this error. Why are you doing this? There may be more direct ways. |
I try to narrow down the width of lines more and more and finally make them fad away. |
Probably the test could be replaced to error on <0 instead of <=0. (At least that works on the mpl_cairo backend). |
For what it's worth, I ran into this issue when trying to remove the lat/lon lines in Basemap without removing the lat/lon ticks on the axes. One solution is to set Glad to see that this issues has been fixed (thanks @dstansby!). |
Bug report
In matplotlib 2.x.x,
ValueError: All values in the dash list must be positive
will be raised if linewidth is set to zero while it seems to work in matplotlib 1.5.x. No idea whether it is a bug or you intend to do so, but my macro don't work anymore because of this...Code for reproduction
Actual outcome
Expected outcome
Matplotlib version
The text was updated successfully, but these errors were encountered: