'Render evoked.'

def _render_evoked(self, evoked_fname, baseline, image_format):

    logger.debug(('Evoked:    Reading    %s' % evoked_fname))
    evokeds = read_evokeds(evoked_fname, baseline=baseline, verbose=False)
    html = []
    for (ei, ev) in enumerate(evokeds):
        global_id = self._get_id()
        kwargs = dict(show=False)
        logger.debug(('Evoked:    Plotting    instance    %s/%s' % ((ei + 1), len(evokeds))))
        img = _fig_to_img(ev.plot, image_format=image_format, **kwargs)
        caption = (u'Evoked    :    %s    (%s)' % (evoked_fname, ev.comment))
        html.append(image_template.substitute(img=img, id=global_id, div_klass='evoked', img_klass='evoked', caption=caption, show=True, image_format=image_format))
        has_types = []
        if (len(pick_types(ev.info, meg=False, eeg=True)) > 0):
            has_types.append('eeg')
        if (len(pick_types(ev.info, meg='grad', eeg=False)) > 0):
            has_types.append('grad')
        if (len(pick_types(ev.info, meg='mag', eeg=False)) > 0):
            has_types.append('mag')
        for ch_type in has_types:
            logger.debug(('                Topomap    type    %s' % ch_type))
            img = _fig_to_img(ev.plot_topomap, ch_type=ch_type, image_format=image_format, **kwargs)
            caption = (u'Topomap    (ch_type    =    %s)' % ch_type)
            html.append(image_template.substitute(img=img, div_klass='evoked', img_klass='evoked', caption=caption, show=True, image_format=image_format))
    logger.debug('Evoked:    done')
    return '\n'.join(html)
