Skip to content

Commit

Permalink
Re #5042 allow log scale on peak selection
Browse files Browse the repository at this point in the history
  • Loading branch information
mdoucet committed Mar 30, 2012
1 parent a108d2e commit 335efa5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
8 changes: 8 additions & 0 deletions Code/Mantid/MantidPlot/src/qti.sip
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,14 @@ public:
double left_break = -DBL_MAX, double right_break = DBL_MAX, int pos = 50,
double stepBeforeBreak = 0.0, double stepAfterBreak = 0.0, int minTicksBeforeBreak = 4,
int minTicksAfterBreak = 4, bool log10AfterBreak = false, int breakWidth = 4, bool breakDecoration = true);

void logLogAxes();
void logXLinY();
void logYlinX();
void linearAxes();
void logColor();
void linColor();

void setAxisScale(int, double, double, int = -1, double=0.0, int=5, int=5);
void setAutoScale();
void setMargin(int);
Expand Down
10 changes: 7 additions & 3 deletions Code/Mantid/scripts/LargeScaleStructures/data_stitching.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ def disconnect(self):
self._call_back)

def connect(self, ws, call_back, xmin=None, xmax=None,
range_min=None, range_max=None, x_title=None):
range_min=None, range_max=None, x_title=None,
log_scale=False):
self._call_back = call_back
_qti.app.connect(_qti.app.mantidUI,
QtCore.SIGNAL("x_range_update(double,double)"),
Expand All @@ -43,6 +44,8 @@ def connect(self, ws, call_back, xmin=None, xmax=None,
title = " "
l.setTitle(" ")
l.setCurveTitle(0, title)
if log_scale:
l.logYlinX()
if x_title is not None:
l.setXTitle(x_title)
if xmin is not None and xmax is not None:
Expand All @@ -55,14 +58,15 @@ def connect(self, ws, call_back, xmin=None, xmax=None,

@classmethod
def connect(cls, ws, call_back, xmin=None, xmax=None,
range_min=None, range_max=None, x_title=None):
range_min=None, range_max=None, x_title=None,
log_scale=False):
if RangeSelector.__instance is not None:
RangeSelector.__instance.disconnect()
else:
RangeSelector.__instance = RangeSelector._Selector()
RangeSelector.__instance.connect(ws, call_back, xmin=xmin, xmax=xmax,
range_min=range_min, range_max=range_max,
x_title=x_title)
x_title=x_title, log_scale=log_scale)

class DataSet(object):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ def _load_entry(entry, ws, title=""):
data_stitching.RangeSelector.connect(ws_list, callback,
range_min=range_min,
range_max=range_max,
x_title=x_title)
x_title=x_title,
log_scale=True)

# Estimate peak limits
ws_output = ws_base+'_all'
Expand Down

0 comments on commit 335efa5

Please sign in to comment.