From d2d9187fedbeb29e96b701d1c78533c30f1e85b9 Mon Sep 17 00:00:00 2001 From: vizzy_viz Date: Thu, 18 May 2023 16:38:48 +0530 Subject: [PATCH] #25900 update figure.py Added variable "fig" for creating a figure --- lib/matplotlib/figure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/figure.py b/lib/matplotlib/figure.py index a7afc9ae63f1..5f6bf49f1a6c 100644 --- a/lib/matplotlib/figure.py +++ b/lib/matplotlib/figure.py @@ -873,7 +873,7 @@ def subplots(self, nrows=1, ncols=1, *, sharex=False, sharey=False, y = np.sin(x**2) # Create a figure - plt.figure() + fig = plt.figure() # Create a subplot ax = fig.subplots()