Created
October 13, 2014 05:58
-
-
Save e-mon/72dd8f636459aa230e68 to your computer and use it in GitHub Desktop.
matplotでfigureを'q'で閉じるためのワンライナー(暫定版)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pylab import * | |
gcf().canvas.mpl_connect('key_press_event', lambda event: event.key == 'q' and close(event.canvas.figure)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment