Closed
Description
Current docs (http://matplotlib.org/devdocs/api/pyplot_api.html#matplotlib.pyplot.subplots) list fig_kw
as one of the arguments that can be passed to plt.subplots
, however this fails with:
import matplotlib.pyplot as plt
fig, axs = plt.subplots(1, 2, fig_kw={'figsize': (15, 8)})
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/dstansby/matplotlib/lib/matplotlib/pyplot.py", line 1190, in subplots
fig = figure(**fig_kw)
File "/home/dstansby/matplotlib/lib/matplotlib/pyplot.py", line 544, in figure
**kwargs)
File "/home/dstansby/matplotlib/lib/matplotlib/backends/backend_qt5agg.py", line 43, in new_figure_manager
thisFig = FigureClass(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'fig_kw'
Either the docs should be updated to note that anything extra handed to plt.subplots
is handed to plt.figure
, or fig_kw
should be an allowed argument.