I'm writing a script that removes data from plots by looping over axes.get_lines(), removing data, then using axes.set_lines(). It works quite well, but when it's a plot with error bars, the vertical part of the error bar is not disappearing.

I'm assuming the vertical part is a vline or something and so should not be with the other lines. Where does this data get stuck? :)