MCPcopy Create free account
hub / github.com/plotly/plotly.py / _repr_mimebundle_

Method _repr_mimebundle_

plotly/basewidget.py:727–744  ·  view source on GitHub ↗

Return mimebundle corresponding to default renderer.

(self, include=None, exclude=None, validate=True, **kwargs)

Source from the content-addressed store, hash-verified

725 raise NotImplementedError # Prefer _repr_mimebundle_
726
727 def _repr_mimebundle_(self, include=None, exclude=None, validate=True, **kwargs):
728 """
729 Return mimebundle corresponding to default renderer.
730 """
731 display_jupyter_version_warnings()
732
733 # Widget layout and data need to be set here in case there are
734 # changes made to the figure after the widget is created but before
735 # the cell is run.
736 self._widget_layout = deepcopy(self._layout_obj._props)
737 self._widget_data = deepcopy(self._data)
738 return {
739 "application/vnd.jupyter.widget-view+json": {
740 "version_major": 2,
741 "version_minor": 0,
742 "model_id": self._model_id,
743 },
744 }
745
746 def _ipython_display_(self):
747 """

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected