Matplotlib Ion, ioff () # This figure will not be shown immediately fig = plt.