From e4c23b377dd3cc09ff29be35587c1fe615b80f0a Mon Sep 17 00:00:00 2001 From: Brandon Sutherland Date: Fri, 16 Aug 2024 08:52:34 -0600 Subject: [PATCH] removed text resize from plotter --- .../src/param_tuning/param_tuning_plotter.py | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/rosflight_rqt_plugins/src/param_tuning/param_tuning_plotter.py b/rosflight_rqt_plugins/src/param_tuning/param_tuning_plotter.py index a9f9e0c..db0d144 100644 --- a/rosflight_rqt_plugins/src/param_tuning/param_tuning_plotter.py +++ b/rosflight_rqt_plugins/src/param_tuning/param_tuning_plotter.py @@ -17,13 +17,6 @@ def __init__(self, config: dict, param_client, layout: QVBoxLayout, plot_rate: f self._canvas = FigureCanvasQTAgg(Figure()) layout.addWidget(self._canvas) - # Get current font size (not sure if this is needed on non-HiDPI screens?) - default_font: QFont = QApplication.font() - if default_font.pointSize() > 0: - self._font_size = default_font.pointSize() * 2 - elif default_font.pixelSize() > 0: - self._font_size = default_font.pixelSize() * 2 - # Plot parameters self._current_group = list(self._config.keys())[0] self._plot_initialized = False @@ -52,9 +45,9 @@ def _plot(self): if not self._plot_initialized: self._canvas.figure.clear() self._ax = self._canvas.figure.subplots() - self._ax.set_xlabel('Time (s)', fontsize=self._font_size) - self._ax.set_ylabel(self._config[self._current_group]['plot_axis_label'], fontsize=self._font_size) - self._ax.tick_params(axis='both', labelsize=self._font_size) + self._ax.set_xlabel('Time (s)') + self._ax.set_ylabel(self._config[self._current_group]['plot_axis_label']) + self._ax.tick_params(axis='both') self._ax.grid(True) self._lineObjects = {} self._canvas.figure.subplots_adjust(left=0.05, right=0.98, top=0.98, bottom=0.05) @@ -75,7 +68,7 @@ def _plot(self): self._lineObjects[plot_name].set_data(x, y) if not self._plot_initialized: - self._ax.legend(loc='upper right', fontsize=self._font_size) + self._ax.legend(loc='upper right') self._ax.relim() self._ax.autoscale_view()