summaryrefslogtreecommitdiff
path: root/silx/gui/plot/CurvesROIWidget.py
diff options
context:
space:
mode:
Diffstat (limited to 'silx/gui/plot/CurvesROIWidget.py')
-rw-r--r--silx/gui/plot/CurvesROIWidget.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/silx/gui/plot/CurvesROIWidget.py b/silx/gui/plot/CurvesROIWidget.py
index 13c3de0..4b10cd6 100644
--- a/silx/gui/plot/CurvesROIWidget.py
+++ b/silx/gui/plot/CurvesROIWidget.py
@@ -46,7 +46,7 @@ ROI are defined by :
__authors__ = ["V.A. Sole", "T. Vincent"]
__license__ = "MIT"
-__date__ = "26/04/2017"
+__date__ = "27/06/2017"
from collections import OrderedDict
@@ -168,9 +168,9 @@ class CurvesROIWidget(qt.QWidget):
The dictionary keys are the ROI names.
Each value is a sub-dictionary of ROI info with the following fields:
- - ``"from"``: x coordinate of the left limit, as a float
- - ``"to"``: x coordinate of the right limit, as a float
- - ``"type"``: type of ROI, as a string (e.g "channels", "energy")
+ - ``"from"``: x coordinate of the left limit, as a float
+ - ``"to"``: x coordinate of the right limit, as a float
+ - ``"type"``: type of ROI, as a string (e.g "channels", "energy")
:param roidict: Dictionary of ROIs
@@ -194,9 +194,11 @@ class CurvesROIWidget(qt.QWidget):
The dictionary keys are the ROI names.
Each value is a sub-dictionary of ROI info with the following fields:
- - ``"from"``: x coordinate of the left limit, as a float
- - ``"to"``: x coordinate of the right limit, as a float
- - ``"type"``: type of ROI, as a string (e.g "channels", "energy")
+ - ``"from"``: x coordinate of the left limit, as a float
+ - ``"to"``: x coordinate of the right limit, as a float
+ - ``"type"``: type of ROI, as a string (e.g "channels", "energy")
+
+
:param order: Field used for ordering the ROIs.
One of "from", "to", "type", "netcounts", "rawcounts".
None (default) to get the same order as displayed in the widget.
@@ -742,7 +744,7 @@ class CurvesROIDockWidget(qt.QDockWidget):
"""Handle ROI widget signal"""
_logger.debug("PlotWindow._roiSignal %s", str(ddict))
if ddict['event'] == "AddROI":
- xmin, xmax = self.plot.getGraphXLimits()
+ xmin, xmax = self.plot.getXAxis().getLimits()
fromdata = xmin + 0.25 * (xmax - xmin)
todata = xmin + 0.75 * (xmax - xmin)
self.plot.remove('ROI min', kind='marker')
@@ -786,7 +788,7 @@ class CurvesROIDockWidget(qt.QDockWidget):
if newroi == "ICR":
roiDict[newroi]['type'] = "Default"
else:
- roiDict[newroi]['type'] = self.plot.getGraphXLabel()
+ roiDict[newroi]['type'] = self.plot.getXAxis().getLabel()
roiDict[newroi]['from'] = fromdata
roiDict[newroi]['to'] = todata
self.roiWidget.fillFromROIDict(roilist=roiList,