You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<spanclass="n">stream_id</span><spanclass="o">=</span><spanclass="s">'qoy4tt6x9w'</span><spanclass="c">#this is the streaming token associated the account `kevintest`</span>
<divclass=" highlight hl-ipython2"><pre><spanclass="n">py</span><spanclass="o">.</span><spanclass="n">plot</span><spanclass="p">(</span><spanclass="n">fig</span><spanclass="p">,</span><spanclass="n">filename</span><spanclass="o">=</span><spanclass="s">'bar_stream'</span><spanclass="p">)</span><spanclass="c">#post this plot up onto the plotly servers</span>
79
+
<divclass=" highlight hl-ipython2"><pre><spanclass="n">py</span><spanclass="o">.</span><spanclass="n">plot</span><spanclass="p">(</span><spanclass="n">fig</span><spanclass="p">,</span><spanclass="n">filename</span><spanclass="o">=</span><spanclass="s">'bar-chart-streaming'</span><spanclass="p">)</span><spanclass="c">#post this plot up onto the plotly servers</span>
<divclass=" highlight hl-ipython2"><pre><spanclass="c">#Now a Stream object is created w/ the same stream_id as the stream id object associated with our bar chart</span>
92
+
<divclass=" highlight hl-ipython2"><pre><spanclass="c">#Now a Stream object is created w/ the same stream_id as the stream id object</span>
<spanclass="n">s</span><spanclass="o">.</span><spanclass="n">open</span><spanclass="p">()</span><spanclass="c">#open a connection to start writing to the plot</span>
<spanclass="n">time</span><spanclass="o">.</span><spanclass="n">sleep</span><spanclass="p">(</span><spanclass="mi">1</span><spanclass="p">)</span><spanclass="c">#wait one second before plotting again</span>
112
+
<spanclass="n">time</span><spanclass="o">.</span><spanclass="n">sleep</span><spanclass="p">(</span><spanclass="mf">0.2</span><spanclass="p">)</span><spanclass="c">#wait one second before plotting again</span>
132
113
133
-
<spanclass="n">s</span><spanclass="o">.</span><spanclass="n">close</span><spanclass="p">()</span><spanclass="c">#close the stream</span>
114
+
<spanclass="n">s</span><spanclass="o">.</span><spanclass="n">close</span><spanclass="p">()</span><spanclass="c">#close the stream</span>
134
115
</pre></div>
135
116
136
117
</div>
@@ -140,10 +121,10 @@ <h2 id="Streaming-Bar-Chart-Demo">Streaming Bar Chart Demo<a class="anchor-link"
0 commit comments