You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just to add a bit more info: this mostly seems to be a problem when plotting with colors='none'. A workaround of sorts is to plot with some color map and set alpha to a very low number (but not zero) to hide the colors, though this isn't really ideal.
There are then some pdf viewer-dependent issues: there is reasonable hatching when viewed in Evince, but the transparency is not shown in Chrome, and no hatches are shown in Adobe Reader.
Not immediately no. The contour hatching is just making use of the existing patch hatching functionality, so I'm guessing the same problem exists for PDF with that too. I seem to remember that there is a difference in behaviour when plotting hatches to Agg vs the PDF backend in that the hatch colours are defined by the colors keyword argument in one but not the other, and as a result they are not being drawn in the PDF backend. This could potentially be solved by having a 2-phase draw stage which draws the patches, and then draws the hatches independently, and ideally where the color and linewidth of the hatch could be controlled as well. This would definately take some development effort to achieve, but I think it would be well worthwhile...
I think this is the same issue: PDF viewed in chrome also isn't showing the correct hatching with fill_between (for example, See Fig.8 or Fig.11 in http://arxiv.org/pdf/1606.01900v1.pdf --- they should be light grey instead of dark black shaded regions). I can try to produce a MWE if that would be helpful.
Activity
wseviour commentedon May 1, 2014
Just to add a bit more info: this mostly seems to be a problem when plotting with
colors='none'. A workaround of sorts is to plot with some color map and set alpha to a very low number (but not zero) to hide the colors, though this isn't really ideal.There are then some pdf viewer-dependent issues: there is reasonable hatching when viewed in Evince, but the transparency is not shown in Chrome, and no hatches are shown in Adobe Reader.
wseviour commentedon May 1, 2014
I think @pelson introduced contourf hatching - do you have any ideas?
pelson commentedon May 9, 2014
Not immediately no. The contour hatching is just making use of the existing patch hatching functionality, so I'm guessing the same problem exists for PDF with that too. I seem to remember that there is a difference in behaviour when plotting hatches to Agg vs the PDF backend in that the hatch colours are defined by the colors keyword argument in one but not the other, and as a result they are not being drawn in the PDF backend. This could potentially be solved by having a 2-phase draw stage which draws the patches, and then draws the hatches independently, and ideally where the color and linewidth of the hatch could be controlled as well. This would definately take some development effort to achieve, but I think it would be well worthwhile...
lzkelley commentedon Jun 8, 2016
I think this is the same issue: PDF viewed in chrome also isn't showing the correct hatching with
fill_between(for example, See Fig.8 or Fig.11 in http://arxiv.org/pdf/1606.01900v1.pdf --- they should be light grey instead of dark black shaded regions). I can try to produce a MWE if that would be helpful.tacaswell commentedon Jun 8, 2016
This seems to be better, but still wrong on v2.0.0b1
http://matplotlib.org/2.0.0b1/mpl_examples/pylab_examples/contourf_hatching_01.pdf
http://matplotlib.org/2.0.0b1/examples/pylab_examples/contourf_hatching.html
attn @jkseppan
QuLogic commentedon Nov 5, 2016
Am I missing something, or is hatching working just fine in those examples?
tacaswell commentedon Nov 8, 2016
@QuLogic The hatches in the pdf are wrong like in #6228
Fill hatches on PDF and PS backends.
NelleV commentedon Nov 14, 2016
Closed in #7421