Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Close a figure with a type long or uuid figure number #2683

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 19, 2013

Conversation

JamesMakela
Copy link
Contributor

If it is possible to create a figure using a figure number that is a type long or a type UUID, then it stands to reason that you should be able to close the figure using that same figure number.

@@ -516,8 +516,12 @@ def close(*args):
arg = args[0]
if arg == 'all':
_pylab_helpers.Gcf.destroy_all()
elif isinstance(arg, int):
elif isinstance(arg, int) or isinstance(arg, long):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs to be ```isinstance(arg, six.integer_types)'''.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree 100%

@mdboom
Copy link
Member

mdboom commented Dec 16, 2013

👍 (and note to self, I think we merge this on master only).

@efiring
Copy link
Member

efiring commented Dec 17, 2013

@JamesMakela would you mind squashing this down to a single commit and doing a force-push? Then I will merge it.

Creating a figure with a type(long) figure number is allowed, so closing should be similarly allowed.

close figure with type UUID as figure number

if we can create a figure with a number that is type UUID,
then it is reasonable to be able to close the figure with it as well.

make the allowed int types Python 2 and 3 compatible
@JamesMakela
Copy link
Contributor Author

Alright, I believe it is done.

@tacaswell
Copy link
Member

test failure was un-related. Restarted it anyway.

efiring added a commit that referenced this pull request Dec 19, 2013
Close a figure with a type long or uuid figure number
@efiring efiring merged commit e293f6d into matplotlib:master Dec 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.