2
votes

I'm combining a contour plot and an imshow. Depending on the colormap and the data, it sometimes happens that the contour labels have a color very similar to the pixmap and are therefore hard to read.

I remember seeing a matplotlib contour demo that showed how the text labels could be surrounded with a little white halo so as to make them readable regardless of the background, but I can't find it anymore. Does anyone know how to do that?

1
check whether this answer works for you : stackoverflow.com/questions/15957774/… - roadrunner66

1 Answers

1
votes

roadrunner66's answer worked, but it was not the halo effect I was looking for. However, I finally found it. You can use PathEffects as shown here:

http://matplotlib.org/examples/pylab_examples/patheffect_demo.html