code: def draw_if_interactive():
      
      DEBUG_MSG("draw_if_interactive()", 1, None)
  
      if matplotlib.is_interactive():
  
          figManager = Gcf.get_active()
          if figManager is not None:
              figManager.canvas.draw_idle()
docs: This should be overriden in a windowing environment if drawing
      should be done in interactive python mode