def save_all_figures(image_path):
 figure_list = []
 (image_dir, image_fmt_str) = image_path.psplit()
 fig_mngr = matplotlib._pylab_helpers.Gcf.get_all_fig_managers()
 for fig_num in (m.num for m in fig_mngr):
  plt.figure(fig_num)
  plt.savefig(image_path.format(fig_num))
  figure_list.append(image_fmt_str.format(fig_num))
 return figure_list

def save_all_figures ( image_path ) : figure_list = [ ] ( image_dir , image_fmt_str ) = image_path . psplit ( ) fig_mngr = matplotlib . _pylab_helpers . Gcf . get_all_fig_managers ( ) for fig_num in ( m . num for m in fig_mngr ) : plt . figure ( fig_num ) plt . savefig ( image_path . format ( fig_num ) ) figure_list . append ( image_fmt_str . format ( fig_num ) ) return figure_list
save all matplotlib figures .