Close event
Example to show connecting events that occur when the figure closes.

import matplotlib.pyplot as plt
def on_close(event
Example to show connecting events that occur when the figure closes.

import matplotlib.pyplot as plt
def on_close(event