def _plot_figure(self, idx, fig_format='json'):
        """
        Returns the figure in html format on the
        first call and
        """
        self.plot.update(idx)
        if self.embed:
            patch = self.renderer.diff(self.plot, binary=False)
            msg = serialize_json(dict(content=patch.content,
                                      root=self.plot.state._id))
            return msg