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
Different line styles between PNG and PDF exports. #6588
Comments
That is also my guess, it looks like the scaling is not being passed through to the pdf backend correctly. attn @jkseppan |
I tested the same example with exports in EPS and SVG, and they look fine (i.e. like the PNG ones) even with MPL from the 2.x master branch. So it seems that the problem is indeed with the PDF backend. |
It seems #5926 changed the interface of GraphicsContext toward subclasses in a way that's a bit unfortunate for how the pdf backend used it |
Factor the dash pattern scaling into a separate function so GraphicsContextPdf.delta can call it. Combine the linewidth and dash comparisons because now linewidth affects dashing. Fixes matplotlib#6588
This problem also shows up in interpolation_none_vs_nearest.py in the gallery, with #6584 applied (and presumably without it). The automatic selection of the number of ticks works for the agg output but not for the pdf. |
I will make a separate issue for the tick number problem. |
When scaling the dash pattern by the linewidth do the scaling at artist creation / value set time rather than at draw time. closes matplotlib#6592 closes matplotlib#6588 closes matplotlib#6590 Closes matplotlib#6693 closes matplotlib#5430
Is the line style supposed to depend on the export backend?
MPL 1.5.1 is from Anaconda and MPL 2.x is from Github, both on Linux (CentOS 7)
With MPL 1.5.1, I get the same line styles between both PDF and PNG exports:
while with master version, they are different between PDF and PNG exports:
NB: the problem seems to be independent from the DPI value: I get similar line styles between both PNG exports with 100 DPI and 300 DPI.
The example snippet is
My guess would that I may be somehow related to the new behavior introduced in #5926, but I didn't have time to have a look yet.
The text was updated successfully, but these errors were encountered: