File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -406,14 +406,15 @@ class Stream:
406
406
Stream example:
407
407
# Initialize a streaming graph
408
408
# by embedding stream_id's in the graph's traces
409
- >>> stream_id = "your_stream_id" # See {plotly_domain}/settings
410
- >>> py.plot(Data([Scatter(x=[],
411
- y=[],
412
- stream=dict(token=stream_id, maxpoints=100))])
409
+ import plotly.plotly as py
410
+ from plotly.graph_objs import Data, Scatter, Stream
411
+ stream_id = "your_stream_id" # See {plotly_domain}/settings
412
+ py.plot(Data([Scatter(x=[], y=[],
413
+ stream=Stream(token=stream_id, maxpoints=100))]))
413
414
# Stream data to the import trace
414
- >>> stream = Stream(stream_id) # Initialize a stream object
415
- >>> stream.open() # Open the stream
416
- >>> stream.write(dict(x=1, y=1)) # Plot (1, 1) in your graph
415
+ stream = Stream(stream_id) # Initialize a stream object
416
+ stream.open() # Open the stream
417
+ stream.write(dict(x=1, y=1)) # Plot (1, 1) in your graph
417
418
"""
418
419
419
420
@utils .template_doc (** tools .get_config_file ())
You can’t perform that action at this time.
0 commit comments