Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 73d9b66

Browse files
committed
overwrite IPython _repr_html using get_embed output
1 parent 496b8be commit 73d9b66

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

plotly/tools.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,9 @@ def __init__(self, url, width, height):
577577
self.embed_code = get_embed(url, width=width, height=height)
578578
super(PlotlyDisplay, self).__init__(data=self.embed_code)
579579

580+
def _repr_html_(self):
581+
return self.embed_code
582+
580583
def _repr_svg_(self):
581584
url = self.resource + ".svg"
582585
res = requests.get(url)

0 commit comments

Comments
 (0)