def save_figures(image_path, fig_count, gallery_conf):
figure_list = []<EOL>fig_managers = matplotlib._pylab_helpers.Gcf.get_all_fig_managers()<EOL>for fig_mngr in fig_managers:<EOL><INDENT>fig = plt.figure(fig_mngr.num)<EOL>kwargs = {}<EOL>to_rgba = matplotlib.colors.colorConverter.to_rgba<EOL>for attr in ['<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>fig_attr = getattr(fig, '<STR_LIT>' + attr)()<EOL>default_attr = matplotlib.rcParams['<STR_LIT>' + attr]<EOL>if to_rgba(fig_attr) != to_rgba(default_attr):<EOL><INDENT>kwargs[attr] = fig_attr<EOL><DEDENT><DEDENT>current_fig = image_path.format(fig_count + fig_mngr.num)<EOL>fig.savefig(current_fig, **kwargs)<EOL>figure_list.append(current_fig)<EOL><DEDENT>if gallery_conf.get('<STR_LIT>', False):<EOL><INDENT>from mayavi import mlab<EOL>e = mlab.get_engine()<EOL>last_matplotlib_fig_num = len(figure_list)<EOL>total_fig_num = last_matplotlib_fig_num + len(e.scenes)<EOL>mayavi_fig_nums = range(last_matplotlib_fig_num, total_fig_num)<EOL>for scene, mayavi_fig_num in zip(e.scenes, mayavi_fig_nums):<EOL><INDENT>current_fig = image_path.format(mayavi_fig_num)<EOL>mlab.savefig(current_fig, figure=scene)<EOL>scale_image(current_fig, current_fig, <NUM_LIT>, <NUM_LIT>)<EOL>figure_list.append(current_fig)<EOL><DEDENT>mlab.close(all=True)<EOL><DEDENT>return figure_list<EOL>
Save all open matplotlib figures of the example code-block

    Parameters
    ----------
    image_path : str
        Path where plots are saved (format string which accepts figure number)
    fig_count : int
        Previous figure number count. Figure number add from this number

    Returns
    -------
    list of strings containing the full path to each figure