优化了重置绘图的代码
This commit is contained in:
@ -1000,33 +1000,40 @@ class MainWindow_SA_label(QMainWindow):
|
||||
self.ui.spinBox_correctEnd.setValue(Config["BCG_EP"])
|
||||
|
||||
def reset_axes(self):
|
||||
self.ax0.clear()
|
||||
self.ax1.clear()
|
||||
self.ax2.clear()
|
||||
self.ax3.clear()
|
||||
self.ax4.clear()
|
||||
self.ax5.clear()
|
||||
self.ax6.clear()
|
||||
self.ax0.grid(True)
|
||||
self.ax0.xaxis.set_major_formatter(ConfigParams.FORMATTER)
|
||||
self.ax0.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE)
|
||||
self.ax1.grid(True)
|
||||
self.ax1.xaxis.set_major_formatter(ConfigParams.FORMATTER)
|
||||
self.ax1.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE)
|
||||
self.ax2.grid(True)
|
||||
self.ax2.xaxis.set_major_formatter(ConfigParams.FORMATTER)
|
||||
self.ax2.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE)
|
||||
self.ax3.grid(True)
|
||||
self.ax3.xaxis.set_major_formatter(ConfigParams.FORMATTER)
|
||||
self.ax3.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE)
|
||||
self.ax4.grid(True)
|
||||
self.ax4.xaxis.set_major_formatter(ConfigParams.FORMATTER)
|
||||
self.ax4.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE)
|
||||
self.ax5.grid(True)
|
||||
self.ax5.xaxis.set_major_formatter(ConfigParams.FORMATTER)
|
||||
self.ax5.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE)
|
||||
self.ax6.grid(True)
|
||||
self.ax6.xaxis.set_major_formatter(ConfigParams.FORMATTER)
|
||||
if self.ax0 is not None:
|
||||
self.ax0.clear()
|
||||
self.ax0.grid(True)
|
||||
self.ax0.xaxis.set_major_formatter(ConfigParams.FORMATTER)
|
||||
self.ax0.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE)
|
||||
if self.ax1 is not None:
|
||||
self.ax1.clear()
|
||||
self.ax1.grid(True)
|
||||
self.ax1.xaxis.set_major_formatter(ConfigParams.FORMATTER)
|
||||
self.ax1.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE)
|
||||
if self.ax2 is not None:
|
||||
self.ax2.clear()
|
||||
self.ax2.grid(True)
|
||||
self.ax2.xaxis.set_major_formatter(ConfigParams.FORMATTER)
|
||||
self.ax2.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE)
|
||||
if self.ax3 is not None:
|
||||
self.ax3.clear()
|
||||
self.ax3.grid(True)
|
||||
self.ax3.xaxis.set_major_formatter(ConfigParams.FORMATTER)
|
||||
self.ax3.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE)
|
||||
if self.ax4 is not None:
|
||||
self.ax4.clear()
|
||||
self.ax4.grid(True)
|
||||
self.ax4.xaxis.set_major_formatter(ConfigParams.FORMATTER)
|
||||
self.ax4.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE)
|
||||
if self.ax5 is not None:
|
||||
self.ax5.clear()
|
||||
self.ax5.grid(True)
|
||||
self.ax5.xaxis.set_major_formatter(ConfigParams.FORMATTER)
|
||||
self.ax5.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE)
|
||||
if self.ax6 is not None:
|
||||
self.ax6.clear()
|
||||
self.ax6.grid(True)
|
||||
self.ax6.xaxis.set_major_formatter(ConfigParams.FORMATTER)
|
||||
|
||||
def on_xlim_change(self, event_ax):
|
||||
# 获取当前x轴范围
|
||||
|
||||
Reference in New Issue
Block a user