File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments