Skip to content

Commit

Permalink
Get rid of silx 2.0 deprecation warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
vasole committed Dec 15, 2023
1 parent 8cd8d51 commit 2c4b498
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions PyMca5/PyMcaGraph/backends/SilxBackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
Silx Plot Backend.
"""

import silx
from silx.gui import qt
from silx.gui.plot import PlotWidget
import numpy
Expand Down Expand Up @@ -79,12 +80,21 @@ def __addItem(self, xdata, ydata, legend=None, info=None,
linestyle = kw.get("linestyle", "-")
linewidth = kw.get("linewidth", 1.0)
linebgcolor = kw.get("linebgcolor", None)
return m(self, xdata, ydata, legend=legend,
replace=replace,
shape=shape, color=color, fill=fill,
overlay=overlay, z=z, linestyle=linestyle,
linewidth=linewidth,
linebgcolor=linebgcolor)
linebgcolor = kw.get("gapcolor", linebgcolor)
if silx.version_info < (1, 2):
return m(self, xdata, ydata, legend=legend,
replace=replace,
shape=shape, color=color, fill=fill,
overlay=overlay, z=z, linestyle=linestyle,
linewidth=linewidth,
linebgcolor=linebgcolor)
else:
return m(self, xdata, ydata, legend=legend,
replace=replace,
shape=shape, color=color, fill=fill,
overlay=overlay, z=z, linestyle=linestyle,
linewidth=linewidth,
gapcolor=linebgcolor)

def _zoomBack(self, pos):
self.getLimitsHistory().pop()
Expand Down

0 comments on commit 2c4b498

Please sign in to comment.