File tree Expand file tree Collapse file tree 1 file changed +2
-17
lines changed Expand file tree Collapse file tree 1 file changed +2
-17
lines changed Original file line number Diff line number Diff line change @@ -101,28 +101,13 @@ def __init__(self, parent=None):
101
101
super (MatDataPlot .Canvas , self ).__init__ (Figure ())
102
102
self .axes = self .figure .add_subplot (111 )
103
103
self .axes .grid (True , color = 'gray' )
104
- self .safe_tight_layout ()
104
+ self .figure . tight_layout ()
105
105
self .setSizePolicy (QSizePolicy .Expanding , QSizePolicy .Expanding )
106
106
self .updateGeometry ()
107
107
108
108
def resizeEvent (self , event ):
109
109
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 ()
126
111
127
112
limits_changed = Signal ()
128
113
You can’t perform that action at this time.
0 commit comments