File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -651,16 +651,14 @@ def newplotfunc(
651
651
if subplot_kws is None :
652
652
subplot_kws = dict ()
653
653
654
- if "surface" == plotfunc . __name__ and not kwargs .get ("_is_facetgrid" , False ):
654
+ if plotfunc . __name__ == "surface" and not kwargs .get ("_is_facetgrid" , False ):
655
655
# Check we have new enough version of matplotlib
656
656
from distutils .version import LooseVersion
657
657
658
658
import matplotlib as mpl
659
659
660
660
if LooseVersion (mpl .__version__ ) < "3.2.0" :
661
661
raise ValueError ("surface plot requires at least matplotlib-3.2.0" )
662
- del LooseVersion
663
- del mpl
664
662
665
663
if ax is None :
666
664
# Need to create a "3d" Axes instance for surface plots
@@ -683,7 +681,7 @@ def newplotfunc(
683
681
plt = import_matplotlib_pyplot ()
684
682
685
683
if (
686
- "surface" == plotfunc . __name__
684
+ plotfunc . __name__ == "surface"
687
685
and not kwargs .get ("_is_facetgrid" , False )
688
686
and ax is not None
689
687
):
Original file line number Diff line number Diff line change @@ -135,7 +135,8 @@ def setup(self):
135
135
# Remove all matplotlib figures
136
136
plt .close ("all" )
137
137
138
- def pass_in_axis (self , plotmethod , subplot_kw = {}):
138
+ def pass_in_axis (self , plotmethod , subplot_kw = None ):
139
+ subplot_kw = {} if subplot_kw is None else subplot_kw
139
140
fig , axes = plt .subplots (ncols = 2 , subplot_kw = subplot_kw )
140
141
plotmethod (ax = axes [0 ])
141
142
assert axes [0 ].has_data ()
You can’t perform that action at this time.
0 commit comments