Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 64f0c61

Browse files
committed
Fixes for MEP27
1 parent a38b6d7 commit 64f0c61

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

lib/matplotlib/_pylab_helpers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ def show_all(cls, block=None):
7777
manager.show()
7878

7979
if block is True:
80+
# Start the mainloop on the last manager, so we don't have a
81+
# mainloop starting for each manager. Not ideal, but works for now.
8082
manager._mainloop()
8183
return
8284
elif block is False:

lib/matplotlib/backend_bases.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2350,15 +2350,15 @@ def get_window_title(self):
23502350
Get the title text of the window containing the figure.
23512351
Return None if there is no window (e.g., a PS backend).
23522352
"""
2353-
if getattr(self, "manager", None):
2353+
if self.manager is not None:
23542354
return self.manager.get_window_title()
23552355

23562356
def set_window_title(self, title):
23572357
"""
23582358
Set the title text of the window containing the figure. Note that
23592359
this has no effect if there is no window (e.g., a PS backend).
23602360
"""
2361-
if getattr(self, "manager", None):
2361+
if self.manager is not None:
23622362
self.manager.set_window_title(title)
23632363

23642364
def get_default_filename(self):

lib/matplotlib/backends/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@
1010

1111
backend = matplotlib.get_backend()
1212

13+
1314
def get_backend_name(name=None):
1415
'''converts the name of the backend into the module to load
1516
name : str, optional
16-
17+
1718
Parameters
1819
----------
1920
The name of the backend to use. If `None`, falls back to

lib/matplotlib/pyplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def show(*args, **kw):
252252
if rcParams['toolbar'] == 'toolmanager':
253253
return _pylab_helpers.Gcf.show_all(*args, **kw)
254254
else:
255-
_show(*args, **kw)
255+
return _show(*args, **kw)
256256

257257

258258
def isinteractive():

0 commit comments

Comments
 (0)