From 403eb1129c47326b879d08919672646ebec4b165 Mon Sep 17 00:00:00 2001 From: ldam <ldam@passcal.nmt.edu> Date: Wed, 23 Aug 2023 11:00:06 -0600 Subject: [PATCH] fix bug lacking of chan_db_info argument whhen calling set_axes_ylim() --- sohstationviewer/view/plotting/plotting_widget/plotting.py | 6 ++++++ .../view/plotting/plotting_widget/plotting_widget.py | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/sohstationviewer/view/plotting/plotting_widget/plotting.py b/sohstationviewer/view/plotting/plotting_widget/plotting.py index 1a9268988..faa1f90b0 100644 --- a/sohstationviewer/view/plotting/plotting_widget/plotting.py +++ b/sohstationviewer/view/plotting/plotting_widget/plotting.py @@ -37,6 +37,7 @@ class Plotting: self.parent.plotting_bot, plot_h, has_min_max_lines=False) ax.x = None ax.plot([0], [0], linestyle="") + ax.chan_db_info = None return ax def plot_multi_color_dots(self, c_data, chan_db_info, chan_id, @@ -120,6 +121,7 @@ class Plotting: ax.x = x else: ax.linkedX = x + ax.chan_db_info = chan_db_info return ax def plot_up_down_dots(self, c_data, chan_db_info, chan_id, ax, linked_ax): @@ -184,6 +186,7 @@ class Plotting: ax.x = x else: ax.linkedX = x + ax.chan_db_info = chan_db_info return ax def plot_time_dots(self, c_data, chan_db_info, chan_id, ax, linked_ax): @@ -226,6 +229,7 @@ class Plotting: ax.x_list = x_list else: ax.linkedX = x_list + ax.chan_db_info = chan_db_info return ax def plot_lines_dots(self, c_data, chan_db_info, chan_id, @@ -315,6 +319,7 @@ class Plotting: else: ax.linkedX = x_list ax.linkedY = y_list + ax.chan_db_info = chan_db_info return ax def plot_lines_s_rate(self, c_data, chan_db_info, chan_id, ax, linked_ax): @@ -399,4 +404,5 @@ class Plotting: zorder=constants.Z_ORDER['DOT']) ax.x_list = x_list ax.y_list = y_list + ax.chan_db_info = chan_db_info return ax diff --git a/sohstationviewer/view/plotting/plotting_widget/plotting_widget.py b/sohstationviewer/view/plotting/plotting_widget/plotting_widget.py index 77a60ce71..9437746df 100755 --- a/sohstationviewer/view/plotting/plotting_widget/plotting_widget.py +++ b/sohstationviewer/view/plotting/plotting_widget/plotting_widget.py @@ -604,7 +604,8 @@ class PlottingWidget(QtWidgets.QScrollArea): pass if new_min_y is not None: - self.plotting_axes.set_axes_ylim(ax, new_min_y, new_max_y) + self.plotting_axes.set_axes_ylim( + ax, new_min_y, new_max_y, ax.chan_db_info) def draw(self): """ -- GitLab