summaryrefslogtreecommitdiff
path: root/silx/gui/plot/Profile.py
diff options
context:
space:
mode:
Diffstat (limited to 'silx/gui/plot/Profile.py')
-rw-r--r--silx/gui/plot/Profile.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/silx/gui/plot/Profile.py b/silx/gui/plot/Profile.py
index f61412d..5a733fe 100644
--- a/silx/gui/plot/Profile.py
+++ b/silx/gui/plot/Profile.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2004-2017 European Synchrotron Radiation Facility
+# Copyright (c) 2004-2018 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -28,7 +28,7 @@ and stacks of images"""
__authors__ = ["V.A. Sole", "T. Vincent", "P. Knobel", "H. Payno"]
__license__ = "MIT"
-__date__ = "17/08/2017"
+__date__ = "24/04/2018"
import weakref
@@ -40,7 +40,7 @@ from silx.image.bilinear import BilinearImage
from .. import icons
from .. import qt
from . import items
-from .Colors import cursorColorForColormap
+from ..colors import cursorColorForColormap
from . import actions
from .PlotToolButtons import ProfileToolButton
from .ProfileMainWindow import ProfileMainWindow
@@ -637,6 +637,12 @@ class ProfileToolBar(qt.QToolBar):
colormap=colormap)
else:
coords = numpy.arange(len(profile[0]), dtype=numpy.float32)
+ # Scale horizontal and vertical profile coordinates
+ if self._roiInfo[2] == 'X':
+ coords = coords * scale[0] + origin[0]
+ elif self._roiInfo[2] == 'Y':
+ coords = coords * scale[1] + origin[1]
+
self.getProfilePlot().addCurve(coords,
profile[0],
legend=profileName,