From c6b6737aa36f938835fd1d8bb35ddbc23afb68e5 Mon Sep 17 00:00:00 2001 From: Tom Hampson <thomas.hampson@stfc.ac.uk> Date: Tue, 6 Apr 2021 15:37:25 +0100 Subject: [PATCH] Make sure the y-axis range changes when limits update. --- docs/source/release/v6.1.0/mantidworkbench.rst | 1 + qt/widgets/instrumentview/src/MiniPlotMpl.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/source/release/v6.1.0/mantidworkbench.rst b/docs/source/release/v6.1.0/mantidworkbench.rst index a2bf5da8f47..13dca475e21 100644 --- a/docs/source/release/v6.1.0/mantidworkbench.rst +++ b/docs/source/release/v6.1.0/mantidworkbench.rst @@ -37,5 +37,6 @@ Bugfixes - First time dialog box will not appear recurrently, if user selected their choice of facility and instrument at least once and checked "Do not show again until next version". - Fixed a bug that would cause a crash if the user right clicked on the plot in the instrument view pick tab after the stored curves were cleared. +- The y-axis in the instrument view's pick tab will now rescale if the range changes. :ref:`Release 6.1.0 <v6.1.0>` diff --git a/qt/widgets/instrumentview/src/MiniPlotMpl.cpp b/qt/widgets/instrumentview/src/MiniPlotMpl.cpp index 3a5ad42a4a5..dff19f464df 100644 --- a/qt/widgets/instrumentview/src/MiniPlotMpl.cpp +++ b/qt/widgets/instrumentview/src/MiniPlotMpl.cpp @@ -124,6 +124,7 @@ void MiniPlotMpl::setData(std::vector<double> x, std::vector<double> y, // is very different we need ensure the scale is tight enough to // see newer plots so we force a recalculation from the data axes.relim(); + axes.autoscaleView(); replot(); } -- GitLab