From: jh777916 Date: Thu, 23 May 2024 10:09:16 +0000 (+0200) Subject: replacing set_picker(float) method to use a bool instead and the set_pickradius(float... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2b7810b19e;p=modules%2Fgui.git replacing set_picker(float) method to use a bool instead and the set_pickradius(float) as recommanded; set_picker(float) is deprecated since matplotlib >= 3.4 --- diff --git a/tools/CurvePlot/src/python/views/CurveView.py b/tools/CurvePlot/src/python/views/CurveView.py index e14d4f26a..0c1a55270 100644 --- a/tools/CurvePlot/src/python/views/CurveView.py +++ b/tools/CurvePlot/src/python/views/CurveView.py @@ -38,8 +38,9 @@ class CurveView(PlotView): x_idx, y_idx = m.getXAxisIndex(), m.getYAxisIndex() d = self._model.getTable().getData() plots = self._mplAxes.plot(d[:, x_idx], d[:, y_idx], label=m._title, alpha = 1., - picker=self._PICKER_PRECISION) + picker=True) self._mplArtist = plots[0] + self._mplArtist.set_pickradius(self._PICKER_PRECISION) self._initialLineWidth = self._mplArtist.get_linewidth() self._initialOpacity = self._mplArtist.get_alpha() self._initialZOrder = self._mplArtist.get_zorder() diff --git a/tools/CurvePlot/src/python/views/StemView.py b/tools/CurvePlot/src/python/views/StemView.py index 995eaa4bf..556baac90 100644 --- a/tools/CurvePlot/src/python/views/StemView.py +++ b/tools/CurvePlot/src/python/views/StemView.py @@ -56,7 +56,8 @@ class StemView(PlotView): # picker for the stemlines for lin in self._mplArtist[1]: - lin.set_picker(self._PICKER_PRECISION) + lin.set_picker(True) + lin.set_pickradius(self._PICKER_PRECISION) def update(self): Logger.Debug("StemView::udpate")