diff --git a/Code/Mantid/MantidPlot/src/Graph.cpp b/Code/Mantid/MantidPlot/src/Graph.cpp index 98ae165ca5fd258bbfc00c208a7c06af45015ff1..fdb1a8138debeb95771c73d3703abbd9ca181021 100644 --- a/Code/Mantid/MantidPlot/src/Graph.cpp +++ b/Code/Mantid/MantidPlot/src/Graph.cpp @@ -1351,6 +1351,10 @@ void Graph::setAxisScale(int axis, double start, double end, int type, double st // log scales can't represent zero or negative values, 1e-10 is a low number that I hope will be lower than most of the data but is still sensible for many color plots //start = start < 1e-90 ? 1e-10 : start; } + else if (type == GraphOptions::Power) + { + sc_engine->setType(ScaleTransformation::Power); + } else { sc_engine->setType(ScaleTransformation::Linear); diff --git a/Code/Mantid/MantidPlot/src/ScaleDetails.cpp b/Code/Mantid/MantidPlot/src/ScaleDetails.cpp index f256d291b8267ee16313fbed8d9ace6b9e7cd1c0..5359ff1c20d94b240ce847356033ee8c2c40b355 100644 --- a/Code/Mantid/MantidPlot/src/ScaleDetails.cpp +++ b/Code/Mantid/MantidPlot/src/ScaleDetails.cpp @@ -95,6 +95,7 @@ ScaleDetails::ScaleDetails(ApplicationWindow* app, Graph* graph, int mappedaxis, m_cmbScaleType = new QComboBox(); m_cmbScaleType->addItem(tr("linear")); m_cmbScaleType->addItem(tr("logarithmic")); + m_cmbScaleType->addItem(tr("power (X^n)")); middleLayout->addWidget(m_lblScaleTypeLabel, 2, 0); middleLayout->addWidget(m_cmbScaleType, 2, 1); diff --git a/Code/Mantid/MantidQt/API/inc/MantidQtAPI/GraphOptions.h b/Code/Mantid/MantidQt/API/inc/MantidQtAPI/GraphOptions.h index b64fa8b370f87718af52972b2fd4c9f85b82f206..513336a469960213164bc7e5a2e55e6b15b8f0f9 100644 --- a/Code/Mantid/MantidQt/API/inc/MantidQtAPI/GraphOptions.h +++ b/Code/Mantid/MantidQt/API/inc/MantidQtAPI/GraphOptions.h @@ -12,7 +12,7 @@ namespace GraphOptions /** * Scale type enumeration */ - EXPORT_OPT_MANTIDQT_API enum ScaleType { Linear = 0, Log10 }; + EXPORT_OPT_MANTIDQT_API enum ScaleType { Linear = 0, Log10, Power }; /** * Axis choice