Issue 1:
Bug report

Bug summary

This was working until recently. Started failing all of the sudden after a Windows 10 update.

Code for reproduction

import matplotlib.pyplot as plt

plt.ion()
fig = plt.figure('test')

Actual outcome

Traceback (most recent call last):
File "C:/###/Code/####/_test_matplitlib_bug.py", line 4, in <module>
fig = plt.figure('test')
File "C:\Anaconda3\envs\py27_sp\lib\site-packages\matplotlib\pyplot.py", line 557, in figure
draw_if_interactive()
File "C:\Users\#####\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\1##\helpers\pycharm_matplotlib_backend\backend_interagg.py", line 39, in draw_if_interactive
figManager.canvas.show()
File "C:\Users\#####\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\1##\helpers\pycharm_matplotlib_backend\backend_interagg.py", line 62, in show
self.figure.tight_layout()
File "C:\Anaconda3\envs\py27_sp\lib\site-packages\matplotlib\figure.py", line 1753, in tight_layout
rect=rect)
File "C:\Anaconda3\envs\py27_sp\lib\site-packages\matplotlib\tight_layout.py", line 326, in get_tight_layout_figure
max_nrows = max(nrows_list)
ValueError: max() arg is an empty sequence

Expected outcome

It was working before a Windows 10 update.

Matplotlib version

Operating system: Windows 10 Home (10.0.17134) Build 171 34

Matplotlib version: 2.0.2

Matplotlib backend (print(matplotlib.get_backend())): module://backend_interagg

Python version: Python 2.7.13 :: Continuum Analytics, Inc.

Jupyter version (if applicable):

Other libraries:

Installed with conda. Default channels.

Issue 2:
I have an animated graph using FuncAnimation. I call tight_layout() on resize to fix the layout:

fig.canvas.mpl_connect('resize_event', lambda *x: plt.tight_layout())

Mostly resizing the window works fine. Sometimes this leads to an exception:

Traceback (most recent call last):
File "/usr/lib/python3.5/tkinter/__init__.py", line 1553, in __call__
return self.func(*args)
File "/home/user/project/env/lib/python3.5/site-packages/matplotlib/backends/backend_tkagg.py", line 279, in resize
self.resize_event()
File "/home/user/project/env/lib/python3.5/site-packages/matplotlib/backend_bases.py", line 1833, in resize_event
self.callbacks.process(s, event)
File "/home/user/project/env/lib/python3.5/site-packages/matplotlib/cbook.py", line 554, in process
proxy(*args, **kwargs)
File "/home/user/project/env/lib/python3.5/site-packages/matplotlib/cbook.py", line 416, in __call__
return mtd(*args, **kwargs)
File "./monitor.py", line 199, in <lambda>
fig.canvas.mpl_connect('resize_event', lambda *x: plt.tight_layout())
File "/home/user/project/env/lib/python3.5/site-packages/matplotlib/pyplot.py", line 1406, in tight_layout
fig.tight_layout(pad=pad, h_pad=h_pad, w_pad=w_pad, rect=rect)
File "/home/user/project/env/lib/python3.5/site-packages/matplotlib/figure.py", line 1753, in tight_layout
rect=rect)
File "/home/user/project/env/lib/python3.5/site-packages/matplotlib/tight_layout.py", line 326, in get_tight_layout_figure
max_nrows = max(nrows_list)
ValueError: max() arg is an empty sequence
Exception in Tkinter callback

I hope for someone this trace is useful. Unfortunately I can not provide a minimal example.

matplotlib==2.0.1