Hi Georgina,
these problems come from individual quadrilaterals being drawn.
Depending on the renderer, e.g. your pdf viewer, several things can go
wrong, like a little gap left for border lines, or overlapping boxes.
So, technically matplotlib might not be at fault. Also, since you
mention pdf this might be a slightly different issue from the one
mentioned below, which definitely comes from the alpha.
Regardless, here some practical advice.
For the alpha problem in interactive viewing, check out [1] for a
workaround that will require some fiddling depending on colormap, length
scales of the plot, and backend.
For your pdf problem you might try to save the figure as a pdf, but have
the mesh rasterized. If the mesh is relatively high resolution or
parallel to the axes this could be more appropriate anyway and you get
the best of both worlds: Space efficient high resolution maps that scale
well, and crisp annotations, labels, axes ticks, etc.
To achieve this just do
mesh = iris.quickplot.pcolormesh(cube)
mesh.set_rasterized(True)
before the saving.
Cheers
Klaus
[1]
https://stackoverflow.com/questions/20678817/pyplot-pcolormesh-confused-when-alpha-not-1
> --
> You received this message because you are subscribed to the Google
> Groups "SciTools (iris, cartopy, cf_units, etc.) -
>
https://github.com/scitools" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
scitools-iri...@googlegroups.com
> <mailto:
scitools-iri...@googlegroups.com>.
> For more options, visit
https://groups.google.com/d/optout.