From d0971921b93a548f66e67b8c02fd76a89b9fd68f Mon Sep 17 00:00:00 2001 From: ldam <ldam@passcal.nmt.edu> Date: Tue, 18 Jul 2023 11:27:29 -0600 Subject: [PATCH] TPS adjust plot and legend's heights --- .../view/plotting/time_power_squared_dialog.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sohstationviewer/view/plotting/time_power_squared_dialog.py b/sohstationviewer/view/plotting/time_power_squared_dialog.py index 1c5acdb97..68ca2cf95 100755 --- a/sohstationviewer/view/plotting/time_power_squared_dialog.py +++ b/sohstationviewer/view/plotting/time_power_squared_dialog.py @@ -89,8 +89,10 @@ class TimePowerSquaredWidget(plotting_widget.PlottingWidget): self.is_working = True self.set_key = key self.plotting_data1 = d_obj.waveform_data[key] + self.plot_total = len(self.plotting_data1) self.plotting_bot = const.BOTTOM + self.plotting_bot_pixel = const.BOTTOM_PX self.processed_channels = [] self.channels = [] self.tps_processors = [] @@ -220,7 +222,7 @@ class TimePowerSquaredWidget(plotting_widget.PlottingWidget): total_days = c_data['tps_data'].shape[0] plot_h = self.plotting_axes.get_height( - 1.5 * total_days, bw_plots_distance=0.003) + total_days, bw_plots_distance=0.003, pixel_height=12.1) ax = self.create_axes(self.plotting_bot, plot_h) ax.text( -0.1, 1.2, @@ -274,7 +276,8 @@ class TimePowerSquaredWidget(plotting_widget.PlottingWidget): ax.legend will create one label for each dot. """ # set height of legend and distance bw legend and upper ax - plot_h = self.plotting_axes.get_height(7, bw_plots_distance=0.003) + plot_h = self.plotting_axes.get_height( + 21, bw_plots_distance=0.004, pixel_height=12) ax = self.plotting_axes.canvas.figure.add_axes( [self.plotting_l, self.plotting_bot, self.plotting_w, plot_h], picker=True -- GitLab