Skip to content

Commit

Permalink
Merge pull request #326 from dmgav/fix-deprecation
Browse files Browse the repository at this point in the history
Fix deprecation
  • Loading branch information
dmgav authored Aug 19, 2024
2 parents 61012a8 + d742561 commit bb8cffb
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions pyxrf/model/lineplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,13 +728,13 @@ def plot_selected_energy_range_original(self, *, e_low=None, e_high=None):
self.plot_energy_barh.remove()

# Create the new plot (based on new parameters if necessary
self.plot_energy_barh = PolyCollection.span_where(
x_v, ymin=y_min, ymax=y_max, where=ss, facecolor="white", edgecolor="yellow", alpha=1
)
# self.plot_energy_barh = self._ax.fill_between(
# x_v, y1=y_min, y2=y_max, where=ss, facecolor="white", edgecolor="yellow", alpha=1
# self.plot_energy_barh = PolyCollection.span_where(
# x_v, ymin=y_min, ymax=y_max, where=ss, facecolor="white", edgecolor="yellow", alpha=1
# )
self._ax.add_collection(self.plot_energy_barh)
# self._ax.add_collection(self.plot_energy_barh)
self.plot_energy_barh = self._ax.fill_between(
x_v, y1=y_min, y2=y_max, where=ss, facecolor="white", edgecolor="yellow", alpha=1
)

def plot_multi_exp_data(self):
while len(self.plot_exp_list):
Expand Down Expand Up @@ -1475,13 +1475,13 @@ def plot_selected_energy_range(self, *, axes, barh_existing, e_low=None, e_high=
barh_existing.remove()

# Create the new plot (based on new parameters if necessary
barh_new = PolyCollection.span_where(
x_v, ymin=y_min, ymax=y_max, where=ss, facecolor="white", edgecolor="yellow", alpha=1
)
# barh_new = axes.fill_between(
# x_v, y1=y_min, y2=y_max, where=ss, facecolor="white", edgecolor="yellow", alpha=1
# barh_new = PolyCollection.span_where(
# x_v, ymin=y_min, ymax=y_max, where=ss, facecolor="white", edgecolor="yellow", alpha=1
# )
axes.add_collection(barh_new)
# axes.add_collection(barh_new)
barh_new = axes.fill_between(
x_v, y1=y_min, y2=y_max, where=ss, facecolor="white", edgecolor="yellow", alpha=1
)

return barh_new

Expand Down

0 comments on commit bb8cffb

Please sign in to comment.