From e417b712758e109287d2013fa02552ea302d2da4 Mon Sep 17 00:00:00 2001 From: Russell Taylor <taylorrj@ornl.gov> Date: Thu, 26 Jul 2012 12:21:23 -0400 Subject: [PATCH] Re #5653. Tweaks to get spectrogram plots behaving. --- Code/Mantid/MantidPlot/src/ApplicationWindow.cpp | 6 ++++-- Code/Mantid/MantidPlot/src/Graph.cpp | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Code/Mantid/MantidPlot/src/ApplicationWindow.cpp b/Code/Mantid/MantidPlot/src/ApplicationWindow.cpp index 1ec99df7e51..f0cee30737a 100644 --- a/Code/Mantid/MantidPlot/src/ApplicationWindow.cpp +++ b/Code/Mantid/MantidPlot/src/ApplicationWindow.cpp @@ -3059,8 +3059,10 @@ void ApplicationWindow::setPreferences(Graph* g) g->setScale(QwtPlot::xBottom, d_axes_scales[2]); g->setScale(QwtPlot::xTop, d_axes_scales[3]); - g->updateSecondaryAxis(QwtPlot::xTop); - g->updateSecondaryAxis(QwtPlot::yRight); + // QtiPlot makes these calls here (as of 26/6/12), but they spoil color fill plots for us. + // Losing them seems to have no detrimental effect. Perhaps we need to update our updateSecondaryAxis code to match QtiPlot's. + //g->updateSecondaryAxis(QwtPlot::xTop); + //g->updateSecondaryAxis(QwtPlot::yRight); QList<int> ticksList; ticksList<<majTicksStyle<<majTicksStyle<<majTicksStyle<<majTicksStyle; diff --git a/Code/Mantid/MantidPlot/src/Graph.cpp b/Code/Mantid/MantidPlot/src/Graph.cpp index 85371f2aeb8..ad313b79b8d 100644 --- a/Code/Mantid/MantidPlot/src/Graph.cpp +++ b/Code/Mantid/MantidPlot/src/Graph.cpp @@ -5119,6 +5119,8 @@ Spectrogram* Graph::plotSpectrogram(Spectrogram *d_spectrogram, CurveType type) if(!rightAxis) return 0; rightAxis->setColorBarEnabled(type != Contour); d_plot->enableAxis(QwtPlot::yRight, type != Contour); + // Ensure that labels are shown on color scale axis + enableAxisLabels(QwtPlot::yRight); //d_spectrogram->setDefaultColorMap(); if(type == GrayScale) rightAxis->setColorBarEnabled(false); //rightAxis->setColorMap(d_spectrogram->data().range(),d_spectrogram->colorMap()); -- GitLab