8000 Probably better this way. · matplotlib/matplotlib@172893d · GitHub
[go: up one dir, main page]

Skip to content

Commit 172893d

Browse files
author
none
committed
Probably better this way.
1 parent b9ed974 commit 172893d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/mpl_toolkits/axes_grid1/parasite_axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ def host_axes(*args, **kwargs):
487487
import matplotlib.pyplot as plt
488488
axes_class = kwargs.pop("axes_class", None)
489489
host_axes_class = host_axes_class_factory(axes_class)
490-
if "figure" in kwargs:
490+
if kwargs.get("figure") != None:
491491
fig = kwargs["figure"]
492492
else:
493493
fig = plt.gcf()
@@ -500,7 +500,7 @@ def host_subplot(*args, **kwargs):
500500
import matplotlib.pyplot as plt
501501
axes_class = kwargs.pop("axes_class", None)
502502
host_subplot_class = host_subplot_class_factory(axes_class)
503-
if "figure" in kwargs:
503+
if kwargs.get("figure") != None:
504504
fig = kwargs["figure"]
505505
else:
506506
fig = plt.gcf()

0 commit comments

Comments
 (0)
0