Skip to content

Commit 4296f5c

Browse files
committed
Merge branch 'master' of https://github.com/plotly/python-api into widgets
2 parents 415f8b5 + 6638801 commit 4296f5c

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

plotly/plotly/plotly.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -406,14 +406,15 @@ class Stream:
406406
Stream example:
407407
# Initialize a streaming graph
408408
# 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))]))
413414
# 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
417418
"""
418419

419420
@utils.template_doc(**tools.get_config_file())

requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ six==1.8.0
1313

1414
## timezone definitions ##
1515
pytz==2014.9
16+
17+
## 2.6 python dependencies ##
18+
simplejson==3.6.5
19+
ordereddict==1.1

setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,9 @@ def readme():
4040
'plotly/matplotlylib/mplexporter',
4141
'plotly/matplotlylib/mplexporter/renderers'],
4242
package_data={'plotly': ['graph_reference/*.json']},
43-
install_requires=['requests', 'six', 'pytz'],
43+
install_requires=['requests',
44+
'six',
45+
'pytz',
46+
'ordereddict',
47+
'simplejson'],
4448
zip_safe=False)

0 commit comments

Comments
 (0)