Skip to content

Instantly share code, notes, and snippets.

@renejahn
renejahn / maplotlib_close.py
Created October 5, 2017 12:57
close matplotlib figures via escape button
import sys
import matplotlib.pyplot as plt
def connect_close(figure=None):
def press_key(event):
if event.key == 'escape':
plt.close('all')
sys.exit(0)
if not figure:
@gregseth
gregseth / Qt4.natvis
Created July 24, 2014 09:27
Visual Studio 2012 debugger info for Qt 4.5+
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="QPoint">
<AlternativeType Name="QPointF"/>
<DisplayString>{{ x = {xp}, y = {yp} }}</DisplayString>
<Expand>
<Item Name="[x]">xp</Item>
<Item Name="[y]">yp</Item>
</Expand>