Skip to content
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

Transparency of overlaid contour fill without effect on underlying isocontours #2767

Closed
jfrieben opened this issue Jan 26, 2014 · 4 comments
Closed

Comments

@jfrieben
Copy link

I have tried to overlay two contour plots by setting the transparency of the first lower one to something like 0.2 and that of the upper one to about 0.8 for both of fill and line colours. While the fill colours of the lower plot appear washed out as expected, the transparency value of the upper plot has no effect at all.
In the attached sample picture, the colour of a number of isocontours in the lower plot has been set to white and the transparency to 1.0. Moreover, the alpha values of fill and contour colours of the upper plot have been set to 1.0. As can be seen from the figure, the colour of the lower contour lines is bold white even in the region where they should be hidden by the second overlaid plot.
This issue affects all matplotlib versions from 0.99.1.2 when I tried this first up to the current release 1.3.1.
test

@tacaswell
Copy link
Member

Could you provide code for a minimal example that exercises this bug? That makes reproducing, and hence fixing, it much easier.

@efiring
Copy link
Member

efiring commented Jan 26, 2014

The zorder might be causing this. Lines have a higher default zorder than patches, so they are drawn on top.

@jfrieben
Copy link
Author

Thanks a lot, efiring! Adding the option `zorder=...' with suitable values does indeed lead to a correct shading of the contour lines.

@mdboom
Copy link
Member

mdboom commented Jan 27, 2014

In the interest of keeping our issue tracker clean, I'll close this, but @jfrieben if you think there's a way we could make this work better from matplotlib's end, feel free to continue to discuss -- we can always reopen.

@mdboom mdboom closed this as completed Jan 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants