Thanks to visit codestin.com
Credit goes to github.com

Skip to content

make docstream copy pasteable; fix parentheses #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 7, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions plotly/plotly/plotly.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,14 +406,15 @@ class Stream:
Stream example:
# Initialize a streaming graph
# by embedding stream_id's in the graph's traces
>>> stream_id = "your_stream_id" # See {plotly_domain}/settings
>>> py.plot(Data([Scatter(x=[],
y=[],
stream=dict(token=stream_id, maxpoints=100))])
import plotly.plotly as py
from plotly.graph_objs import Data, Scatter, Stream
stream_id = "your_stream_id" # See {plotly_domain}/settings
py.plot(Data([Scatter(x=[], y=[],
stream=Stream(token=stream_id, maxpoints=100))]))
# Stream data to the import trace
>>> stream = Stream(stream_id) # Initialize a stream object
>>> stream.open() # Open the stream
>>> stream.write(dict(x=1, y=1)) # Plot (1, 1) in your graph
stream = Stream(stream_id) # Initialize a stream object
stream.open() # Open the stream
stream.write(dict(x=1, y=1)) # Plot (1, 1) in your graph
"""

@utils.template_doc(**tools.get_config_file())
Expand Down