code: def _plot_figure(self, idx, fig_format='json'):
          
          self.plot.update(idx)
          if self.embed:
              return self.renderer.diff(self.plot)
docs: Returns the figure in html format on the
          first call and