'Render a slider of figs to the report.
Parameters
figs : list of figures.
Each figure in the list can be an instance of
matplotlib.pyplot.Figure, mayavi.core.scene.Scene,
or np.ndarray (images read in using scipy.imread).
captions : list of str | list of float | None
A list of captions to the figures. If float, a str will be
constructed as `%f s`. If None, it will default to
`Data slice %d`.
section : str
Name of the section. If section already exists, the figures
will be appended to the end of the section.
title : str
The title of the slider.
scale : float | None | callable
Scale the images maintaining the aspect ratio.
If None, no scaling is applied. If float, scale will determine
the relative scaling (might not work for scale <= 1 depending on
font sizes). If function, should take a figure object as input
parameter. Defaults to None.
image_format : str | None
The image format to be used for the report, can be \'png\' or \'svd\'.
None (default) will use the default specified during Report
class construction.
Notes
.. versionadded:: 0.10.0'

def add_slider_to_section(self, figs, captions=None, section='custom', title='Slider', scale=None, image_format=None):

    _check_scale(scale)
    image_format = _check_image_format(self, image_format)
    if (not isinstance(figs[0], list)):
        figs = [figs]
    else:
        raise NotImplementedError('`add_slider_to_section`    can    only    add    one    slider    at    a    time.')
    (figs, _, _) = self._validate_input(figs, section, section)
    sectionvar = self._sectionvars[section]
    self._sectionlabels.append(sectionvar)
    global_id = self._get_id()
    img_klass = self._sectionvars[section]
    name = 'slider'
    html = []
    slides_klass = ('%s-%s' % (name, global_id))
    div_klass = ('span12    %s' % slides_klass)
    if isinstance(figs[0], list):
        figs = figs[0]
    sl = np.arange(0, len(figs))
    slices = []
    img_klass = ('slideimg-%s' % name)
    if (captions is None):
        captions = [('Data    slice    %d' % ii) for ii in sl]
    elif isinstance(captions, (list, tuple, np.ndarray)):
        if (len(figs) != len(captions)):
            raise ValueError('Captions    must    be    the    same    length    as    the    number    of    slides.')
        if isinstance(captions[0], (float, int)):
            captions = [('%0.3f    s' % caption) for caption in captions]
    else:
        raise TypeError(('Captions    must    be    None    or    an    iterable    of    float,    int,    str,    Got    %s' % type(captions)))
    for (ii, (fig, caption)) in enumerate(zip(figs, captions)):
        img = _fig_to_img(fig=fig, scale=scale, image_format=image_format)
        slice_id = ('%s-%s-%s' % (name, global_id, sl[ii]))
        first = (True if (ii == 0) else False)
        slices.append(_build_html_image(img, slice_id, div_klass, img_klass, caption, first, image_format=image_format))
    slider_id = ('select-%s-%s' % (name, global_id))
    image_html = u'\n'.join(slices)
    html.append(_build_html_slider(sl, slides_klass, slider_id, start_value=0))
    html = '\n'.join(html)
    slider_klass = sectionvar
    self.html.append(slider_full_template.substitute(id=global_id, title=title, div_klass=slider_klass, slider_id=slider_id, html=html, image_html=image_html))
    self.fnames.append(('%s-#-%s-#-custom' % (section, sectionvar)))
