Skip to content

Commit

Permalink
removed text resize from plotter
Browse files Browse the repository at this point in the history
  • Loading branch information
bsutherland333 committed Aug 16, 2024
1 parent 4588fb9 commit e4c23b3
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions rosflight_rqt_plugins/src/param_tuning/param_tuning_plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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()
Expand Down

0 comments on commit e4c23b3

Please sign in to comment.