title: plotly inside jupyter notebook python
body: <p>Does anyone know how to use <code>plotly</code> inside <code>jupyter notebook</code> using python?</p>
  
  <p>The documentation is not very well organized, at-least not from my point of view.</p>
  
  <p>For example, I can run the following code but it generates a graph in a HTML file that can be accessed OUTSIDE of <code>jupyter notebook</code>. Is there a way for the graph to be rendered inside the notebook? </p>
  
  <p>What is also not clear to me (as documentation is poor) is that does one require a credentials to use <code>plotly</code> for plots inside <code>jupyter notebook</code>? Are the credentials only required for hosting the plots on their cloud and nothing more? </p>
  
  <p>As well I find that there isn't any real documentation of <code>cufflinks</code>. All it says is it makes using <code>plotly</code> with <code>pandas</code> dataframes easier. But for someone who isn't a developer it would be nice if there was detailed documentation on why exactly is it necessary and what exactly is it doing that makes life easier.</p>
  
  <pre><code>import plotly.plotly as py
  from plotly.graph_objs import *
  
  trace0 = Scatter(
    x=[1, 2, 3, 4],
    y=[10, 15, 13, 17]
  )
  trace1 = Scatter(
    x=[1, 2, 3, 4],
    y=[16, 5, 11, 9]
  )
  data = Data([trace0, trace1])
  
  plotly.offline.plot(data, filename = 'basic-line')
  
  /Users/blahblah/anaconda/lib/python2.7/site-packages/plotly/offline/offline.py:433: UserWarning:
  
  Your filename `basic-line` didn't end with .html. Adding .html to the end of your file.
  
  'file:///Users/blahblach/Box Sync/NS/NBooks/basic-line.html'
  In [ ]:
  </code></pre>
  
  <p>If I change the last line in the code to:</p>
  
  <pre><code>py.iplot(data, filename = 'basic-line')
  </code></pre>
  
  <p>I get the credential error:</p>
  
  <pre><code>PlotlyLocalCredentialsError: 
  Couldn't find a 'username', 'api-key' pair for you on your local machine. To sign in temporarily (until you stop running Python), run:
  &gt;&gt;&gt; import plotly.plotly as py
  &gt;&gt;&gt; py.sign_in('username', 'api_key')
  
  Even better, save your credentials permanently using the 'tools' module:
  &gt;&gt;&gt; import plotly.tools as tls
  &gt;&gt;&gt; tls.set_credentials_file(username='username', api_key='api-key')
  
  For more help, see https://plot.ly/python.
  </code></pre>
  
  <p>UPDATE:</p>
  
  <p>I tried to execute the pandas examples as described <a href="https://plot.ly/ipython-notebooks/cufflinks/" rel="noreferrer">here</a>.</p>
  
  <p>I get credential errors for all <code>df.iplot()</code> or <code>Series.iplot()</code> commands. </p>
  
  <p>Can someone kindly explain why am I getting credential errors despite using iplot(). </p>
  
  <p>There is also no useful documentation regarding <code>cufflinks</code>.</p>
  
  <p>The <code>plot.ly</code> documentation is one of the worst I have seen. Organization is a mess and not very example friendly. </p>