def iplot(figure_or_data, show_link=True, link_text='Export to plot.ly', validate=True, image=None, filename='plot_image', image_width=800, image_height=600):
 if (not __PLOTLY_OFFLINE_INITIALIZED):
  raise PlotlyError('\n'.join(['Plotly Offline mode has not been initialized in this notebook. Run: ', '', 'import plotly', 'plotly.offline.init_notebook_mode() # run at the start of every ipython notebook']))
 if (not ipython):
  raise ImportError('`iplot` can only run inside an IPython Notebook.')
 config = {}
 config['showLink'] = show_link
 config['linkText'] = link_text
 (plot_html, plotdivid, width, height) = _plot_html(figure_or_data, config, validate, '100%', 525, True)
 ipython_display.display(ipython_display.HTML(plot_html))
 if image:
  if (image not in __IMAGE_FORMATS):
   raise ValueError('The image parameter must be one of the following: {}'.format(__IMAGE_FORMATS))
  script = get_image_download_script('iplot').format(format=image, width=image_width, height=image_height, filename=filename, plot_id=plotdivid)
  time.sleep(1)
  ipython_display.display(ipython_display.HTML(script))

def iplot ( figure_or_data , show_link = True , link_text = 'Export to plot.ly' , validate = True , image = None , filename = 'plot_image' , image_width = 800 , image_height = 600 ) : if ( not __PLOTLY_OFFLINE_INITIALIZED ) : raise PlotlyError ( '\n' . join ( [ 'Plotly Offline mode has not been initialized in this notebook. Run: ' , '' , 'import plotly' , 'plotly.offline.init_notebook_mode() # run at the start of every ipython notebook' ] ) ) if ( not ipython ) : raise ImportError ( '`iplot` can only run inside an IPython Notebook.' ) config = { } config [ 'showLink' ] = show_link config [ 'linkText' ] = link_text ( plot_html , plotdivid , width , height ) = _plot_html ( figure_or_data , config , validate , '100%' , 525 , True ) ipython_display . display ( ipython_display . HTML ( plot_html ) ) if image : if ( image not in __IMAGE_FORMATS ) : raise ValueError ( 'The image parameter must be one of the following: {}' . format ( __IMAGE_FORMATS ) ) script = get_image_download_script ( 'iplot' ) . format ( format = image , width = image_width , height = image_height , filename = filename , plot_id = plotdivid ) time . sleep ( 1 ) ipython_display . display ( ipython_display . HTML ( script ) )
create a unique url for this plot in plotly and open in ipython .