Skip to content

Commit cff49ed

Browse files
committed
Revert "Fix #35 - "bottom cannot be >= top" matplotlib error (#52)"
This reverts commit cb7d874.
1 parent 91bbc1f commit cff49ed

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

src/rqt_plot/data_plot/mat_data_plot.py

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -101,28 +101,13 @@ def __init__(self, parent=None):
101101
super(MatDataPlot.Canvas, self).__init__(Figure())
102102
self.axes = self.figure.add_subplot(111)
103103
self.axes.grid(True, color='gray')
104-
self.safe_tight_layout()
104+
self.figure.tight_layout()
105105
self.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
106106
self.updateGeometry()
107107

108108
def resizeEvent(self, event):
109109
super(MatDataPlot.Canvas, self).resizeEvent(event)
110-
self.safe_tight_layout()
111-
112-
def safe_tight_layout(self):
113-
"""
114-
Deal with "ValueError: bottom cannot be >= top" bug in older matplotlib versions
115-
(before v2.2.3)
116-
117-
References:
118-
- https://github.com/matplotlib/matplotlib/pull/10915
119-
- https://github.com/ros-visualization/rqt_plot/issues/35
120-
"""
121-
try:
122-
self.figure.tight_layout()
123-
except ValueError:
124-
if parse_version(matplotlib.__version__) >= parse_version('2.2.3'):
125-
raise
110+
self.figure.tight_layout()
126111

127112
limits_changed = Signal()
128113

0 commit comments

Comments
 (0)