MCPcopy Index your code
hub / github.com/plotly/plotly.py / displayHTML

Method displayHTML

plotly/io/_base_renderers.py:737–756  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

735
736 @property
737 def displayHTML(self):
738 import inspect
739
740 if self._displayHTML is None:
741 for frame in inspect.getouterframes(inspect.currentframe()):
742 global_names = set(frame.frame.f_globals)
743 # Check for displayHTML plus a few others to reduce chance of a false
744 # hit.
745 if all(v in global_names for v in ["displayHTML", "display", "spark"]):
746 self._displayHTML = frame.frame.f_globals["displayHTML"]
747 break
748
749 if self._displayHTML is None:
750 raise EnvironmentError(
751 """
752Unable to detect the Databricks displayHTML function. The 'databricks' renderer is only
753supported when called from within the Databricks notebook environment."""
754 )
755
756 return self._displayHTML
757
758 def render(self, fig_dict):
759 from plotly.io import to_html

Callers 1

renderMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected