We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8c16c61 + 9847852 commit e293f6dCopy full SHA for e293f6d
lib/matplotlib/pyplot.py
@@ -516,8 +516,12 @@ def close(*args):
516
arg = args[0]
517
if arg == 'all':
518
_pylab_helpers.Gcf.destroy_all()
519
- elif isinstance(arg, int):
+ elif isinstance(arg, six.integer_types):
520
_pylab_helpers.Gcf.destroy(arg)
521
+ elif hasattr(arg, 'int'):
522
+ # if we are dealing with a type UUID, we
523
+ # can use its integer representation
524
+ _pylab_helpers.Gcf.destroy(arg.int)
525
elif is_string_like(arg):
526
allLabels = get_figlabels()
527
if arg in allLabels:
0 commit comments