Skip to content

Commit

Permalink
Corrected handling of errorbar containers
Browse files Browse the repository at this point in the history
  • Loading branch information
GuiMacielPereira committed May 16, 2024
1 parent 2ebd4d4 commit 8bcdb79
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@


from matplotlib.lines import Line2D
from matplotlib.container import ErrorbarContainer

from mantid.plots.legend import LegendProperties
from mantid.plots import datafunctions, MantidAxes
Expand Down Expand Up @@ -124,7 +125,7 @@ def _replot_current_curve(self, plot_kwargs):
curve_index = ax.get_lines().index(curve)
errorbar = False
else:
curve_index = ax.get_lines().index(curve[0])
curve_index = [artist for artist in ax.containers if isinstance(artist, ErrorbarContainer)].index(curve)
errorbar = True

# When you remove the curve on a waterfall plot, the remaining curves are repositioned so that they are
Expand Down

0 comments on commit 8bcdb79

Please sign in to comment.