Skip to content
Prev Previous commit
Next Next commit
Add figure() function
  • Loading branch information
lukelbd committed Jan 20, 2020
commit 729ea2a74c34582d3b3febdb1bdc866a36da33a9
16 changes: 16 additions & 0 deletions proplot/subplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -2535,6 +2535,22 @@ def _journal_figsize(journal):
return width, height


# TODO: Figure out how to save subplots keyword args!
@docstring.dedent_interpd
def figure(**kwargs):
"""
Analogous to `matplotlib.pyplot.figure`, create an empty figure meant
to be filled with axes using `Figure.add_subplot`.

Parameters
----------
%(figure_doc)s
**kwargs
Passed to `Figure`.
"""
return plt.figure(FigureClass=Figure, **kwargs)


def subplots(
array=None, ncols=1, nrows=1, ref=1, order='C',
left=None, right=None, bottom=None, top=None, wspace=None, hspace=None,
Expand Down