def _auto_draw_if_interactive(fig, val):
 if (val and matplotlib.is_interactive() and (not fig.canvas.is_saving())):
  fig.canvas.draw_idle()

def _auto_draw_if_interactive ( fig , val ) : if ( val and matplotlib . is_interactive ( ) and ( not fig . canvas . is_saving ( ) ) ) : fig . canvas . draw_idle ( )
this is an internal helper function for making sure that auto-redrawing works as intended in the plain python repl .