diff --git a/sohstationviewer/view/plotting/plotting_widget/plotting_axes.py b/sohstationviewer/view/plotting/plotting_widget/plotting_axes.py index 9becc2273e3f20a52939135af500c90785bcf8f0..2597715075b0a1b24c9f75465705dc53101b8807 100644 --- a/sohstationviewer/view/plotting/plotting_widget/plotting_axes.py +++ b/sohstationviewer/view/plotting/plotting_widget/plotting_axes.py @@ -184,13 +184,6 @@ class PlottingAxes: axes, label of channel will be displayed with sub title's format - under main title. """ - if linked_ax is None: - # clear all texts before recreated. - # But not clear when this is a linked_ax because texts are already - # cleared with ax, if clear with linked_ax all info of ax won't be - # displayed - ax.texts.clear() - if label is None: label = chan_db_info['label'] @@ -229,7 +222,7 @@ class PlottingAxes: # set samples' total on right side if len(sample_no_list) == 1: - ax.sampleLbl = ax.text( + ax.center_total_points_lbl = ax.text( 1.005, 0.5, sample_no_list[0], horizontalalignment='left', @@ -247,7 +240,7 @@ class PlottingAxes: # and won't be changed in set_lim, then don't need to assign a # variable for it. # bottom - ax.text( + ax.bottom_total_points_lbl = ax.text( 1.005, sample_no_pos[0], sample_no_list[0], horizontalalignment='left', @@ -258,7 +251,7 @@ class PlottingAxes: size=self.parent.font_size ) # top - ax.text( + ax.top_total_points_lbl = ax.text( 1.005, sample_no_pos[1], sample_no_list[1], horizontalalignment='left', diff --git a/sohstationviewer/view/plotting/plotting_widget/plotting_widget.py b/sohstationviewer/view/plotting/plotting_widget/plotting_widget.py index 77a60ce7172299433665c51d96590a7722aa2634..a26463af3e4afec0fba9b2b2c21f72a72e6ba8d4 100755 --- a/sohstationviewer/view/plotting/plotting_widget/plotting_widget.py +++ b/sohstationviewer/view/plotting/plotting_widget/plotting_widget.py @@ -557,7 +557,7 @@ class PlottingWidget(QtWidgets.QScrollArea): self.max_x)] # reset total of samples on the right - self.gap_bar.sampleLbl.set_text(len(new_gaps)) + self.gap_bar.center_total_points_lbl.set_text(len(new_gaps)) for ax in self.axes: if hasattr(ax, 'x') and ax.x is None: @@ -596,7 +596,7 @@ class PlottingWidget(QtWidgets.QScrollArea): new_min_y = min(ax.y) new_max_y = max(ax.y) try: - ax.sampleLbl.set_text(total_points) + ax.center_total_points_lbl.set_text(total_points) except AttributeError: # for case of having top and bottom total points # which is for RT130's SOH only, trust in total point