Skip to content

Instantly share code, notes, and snippets.

@chriddyp
Created March 6, 2014 23:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chriddyp/9402036 to your computer and use it in GitHub Desktop.
Save chriddyp/9402036 to your computer and use it in GitHub Desktop.
def show_plot(url, width="100%", height=525):
if isinstance( width, ( int, long ) ):
s = '<iframe height="%s" id="igraph" scrolling="no" seamless="seamless" src="%s" width="%s"></iframe>' %\
(height+25, "/".join(map(str,[url, width, height])), width+25)
else:
s = '<iframe height="%s" id="igraph" scrolling="no" seamless="seamless" src="%s" width="%s"></iframe>' %\
(height+25, url, width)
from IPython.display import HTML
return HTML(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment