I have a plot in matplotlib with multiple subplots(axes), and I want to annotate the points within the axes. However, subsequent axes overlay annotations from previous axes (eg annotation on subplot(4,4,1) goes under subplot(4,4,2)). I have set the annotation zorder nice and high, but to no avail :/
I’ve used a modified version of Joe Kington’s awesome DataCursor for the annotations.
Any help would be greatly appreciated
Here’s an example:

One way to do it is to pop the text created by
annotateout of the axes and add it to the figure. This way it will be displayed on top of all of the subplots.As a quick example of the problem you’re having:
If we just pop the text object out of the axes and add it to the figure instead, it will be on top:
You mentioned the
DataCursorsnippet, and there you’d want to change theannotatemethod:I haven’t tested the last bit, but it should work…