Skip to content
Snippets Groups Projects
Commit 884eef8d authored by Peter Parker's avatar Peter Parker
Browse files

Refs #9710. Fix unit label.

Manually overwrite our own label at the end of the reduction.

Fix PolotAxis so that if the YUnitLabel of an axis has been set, then that
should be displayed in plots instead of any other unit settings.
parent bc223b46
No related branches found
No related tags found
No related merge requests found
......@@ -90,6 +90,12 @@ namespace MantidQt
*/
void PlotAxis::titleFromYData(const Mantid::API::MatrixWorkspace &workspace)
{
if( !workspace.YUnitLabel().empty() )
{
m_title = QString::fromStdString(workspace.YUnitLabel());
return;
}
m_title = QString::fromStdString(workspace.YUnit());
if(workspace.isDistribution() && workspace.axes() > 0 && workspace.getAxis(0)->unit())
{
......
......@@ -536,6 +536,8 @@ def WavRangeReduction(wav_start=None, wav_end=None, full_trans_wav=None, name_su
if resetSetup:
_refresh_singleton()
mtd[retWSname].setYUnitLabel("I(q) (cm-1)")
return retWSname
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment