diff --git a/sohstationviewer/view/plotting/plotting_widget/plotting.py b/sohstationviewer/view/plotting/plotting_widget/plotting.py index 44389d328c8fa6281338b0365b132c53710cd8a4..74ebf7f5d1bda1178ebcdcb577c38c1ac3e7c2b7 100644 --- a/sohstationviewer/view/plotting/plotting_widget/plotting.py +++ b/sohstationviewer/view/plotting/plotting_widget/plotting.py @@ -181,6 +181,8 @@ class Plotting: sample_no_pos=[0.25, 0.75], chan_db_info=chan_db_info, linked_ax=linked_ax) + # x_bottom, x_top are the times of data points to be displayed at + # bottom or top of the plot ax.x_bottom = np.array(points_list[0]) ax.x_top = np.array(points_list[1]) diff --git a/sohstationviewer/view/plotting/plotting_widget/plotting_axes.py b/sohstationviewer/view/plotting/plotting_widget/plotting_axes.py index 070cb236d537f3d42954c46c46e1bf913ff17620..cbe97d14472c1054915a2e7f9f9f32b1ab4a0d11 100644 --- a/sohstationviewer/view/plotting/plotting_widget/plotting_axes.py +++ b/sohstationviewer/view/plotting/plotting_widget/plotting_axes.py @@ -222,6 +222,10 @@ class PlottingAxes: # set samples' total on right side if len(sample_no_list) == 1: + # center_total_point_lbl: The label to display total number of data + # points for plots whose ax has attribute x_list. + # The plotTypes that use this label are linesDot, linesSRate, + # linesMassPos, dotForTime, multiColorDot ax.center_total_point_lbl = ax.text( 1.005, 0.5, sample_no_list[0], @@ -233,13 +237,12 @@ class PlottingAxes: size=self.parent.font_size ) else: - # Each zoom this infor is created again. - # Plots that have data separated in two to have text in top and - # bottom, sample rate= 1. These numbers completely depends - # on data created in trim_downsample_chan_with_spr_less_or_equal_1 - # and won't be changed in set_lim, then don't need to assign a - # variable for it. - # bottom + # bottom_total_point_lbl, top_total_point_lbl are label to diplay + # total number of data points which are splitted into top + # and bottom. The ax needs to include attributes x_bottom and x_top + # The plotTypes that use these labels are upDownDots (and linesDot + # with channel='GPS Lk/Unlk' which will have another MR to add + # x_bottom and x_top for this) ax.bottom_total_point_lbl = ax.text( 1.005, sample_no_pos[0], sample_no_list[0],