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(
651651 if subplot_kws is None :
652652 subplot_kws = dict ()
653653
654- if "surface" == plotfunc . __name__ and not kwargs .get ("_is_facetgrid" , False ):
654+ if plotfunc . __name__ == "surface" and not kwargs .get ("_is_facetgrid" , False ):
655655 # Check we have new enough version of matplotlib
656656 from distutils .version import LooseVersion
657657
658658 import matplotlib as mpl
659659
660660 if LooseVersion (mpl .__version__ ) < "3.2.0" :
661661 raise ValueError ("surface plot requires at least matplotlib-3.2.0" )
662- del LooseVersion
663- del mpl
664662
665663 if ax is None :
666664 # Need to create a "3d" Axes instance for surface plots
@@ -683,7 +681,7 @@ def newplotfunc(
683681 plt = import_matplotlib_pyplot ()
684682
685683 if (
686- "surface" == plotfunc . __name__
684+ plotfunc . __name__ == "surface"
687685 and not kwargs .get ("_is_facetgrid" , False )
688686 and ax is not None
689687 ):
Original file line number Diff line number Diff line change @@ -135,7 +135,8 @@ def setup(self):
135135 # Remove all matplotlib figures
136136 plt .close ("all" )
137137
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
139140 fig , axes = plt .subplots (ncols = 2 , subplot_kw = subplot_kw )
140141 plotmethod (ax = axes [0 ])
141142 assert axes [0 ].has_data ()
You can’t perform that action at this time.
0 commit comments