Skip to content

Commit 496b8be

Browse files
committed
send width and height arg to PlotlyDisplay
1 parent 36469d3 commit 496b8be

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plotly/tools.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def embed(file_owner_or_url, file_id=None, width="100%", height=525):
307307
fid=file_id)
308308
else:
309309
url = file_owner_or_url
310-
return PlotlyDisplay(url)
310+
return PlotlyDisplay(url, width, height)
311311
else:
312312
warnings.warn(
313313
"Looks like you're not using IPython or Sage to embed this plot. "
@@ -572,9 +572,9 @@ class PlotlyDisplay(IPython.core.display.HTML):
572572
object can provide alternate representations.
573573
574574
"""
575-
def __init__(self, url):
575+
def __init__(self, url, width, height):
576576
self.resource = url
577-
self.embed_code = get_embed(url)
577+
self.embed_code = get_embed(url, width=width, height=height)
578578
super(PlotlyDisplay, self).__init__(data=self.embed_code)
579579

580580
def _repr_svg_(self):

0 commit comments

Comments
 (0)