Errorbar layering

This was first reported on the mailing list by me here: http://old.nabble.com/errorbar-layering-issue–td32149181.html
An image depicting the problem is also available through that link. The message text is below.

I have come across an odd layering issue with errorbars. The errorbar caps are not drawn at the same layer as the errorbar itself. Also, the line connecting multiple errorbars are plotted on a completely different layer than the errorbars. I am attaching an example demonstrating this. Note the green caps are showing up on top of the red errorbar, meanwhile, the red errorbar is drawn on top of the green errorbar. Also notice that the thin red line connecting the red errorbars is showing up on top of the green cap for lambda = 1.

I am not exactly sure how this should be fixed. It is most likely an issue with the fact that the caps are drawn as markers instead of a line (I am guessing so that the marker would then be sized based on width in points instead of data). When an axes’ child objects are z-sorted, the objects that do not declare a z-order are loaded in the order of their creation (or is it in some arbitrary order based on the type of collection?).

Author: Fantashit

1 thought on “Errorbar layering

  1. Ok, I found the solution already. I plot all those lines which should appear in the background with the keyword zorder=1. That one did the trick.

Comments are closed.