From 51a6532a5eb157420379d1f9072a505a4a0aa355 Mon Sep 17 00:00:00 2001 From: Frank Loesche Date: Sun, 3 May 2020 14:36:06 -0400 Subject: [PATCH] Set minimum size of MatDataPlot When the size of MatDataPlot gets down or below the minimum size of the QVBoxLayout it contains, the matplot backend fails as it requires a positive size. Explicitely setting the minimumSize of MatDataPlot seems to fix this problem. --- src/rqt_plot/data_plot/mat_data_plot.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rqt_plot/data_plot/mat_data_plot.py b/src/rqt_plot/data_plot/mat_data_plot.py index 2959a46..9962bbc 100644 --- a/src/rqt_plot/data_plot/mat_data_plot.py +++ b/src/rqt_plot/data_plot/mat_data_plot.py @@ -134,6 +134,7 @@ def __init__(self, parent=None): vbox.addWidget(self._toolbar) vbox.addWidget(self._canvas) self.setLayout(vbox) + self.setMinimumSize(self.layout().minimumSize().width() + 1, self.layout().minimumSize().height() + 1 ) self._curves = {} self._current_vline = None