-
-
Notifications
You must be signed in to change notification settings - Fork 544
Streaming circle shapes graph #268
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
Comments
@cloaked123, here's a full, working example of a stream with shapes (circles in this case):
Helpful? The gist is that you need to use the |
Wow this is awesome. Thanks a lot! Sent from my iPhone On Thu, Dec 31, 2015 at 12:44 PM -0800, "Andrew" [email protected] wrote: @cloaked123, here's a full, working example of a stream with shapes (circles in this case): import random import colorlover as cl import plotly.plotly as py Define a couple functions to make the important bits more readabledef get_shape(color, type='circle'): def move_shape(shape): Make the initial plot.token = py.get_credentials()['stream_ids'][0] Traces hold stream information. In this case, we at leastneed a place holder trace to hold the streaming target.trace0 = go.Scatter(stream={'token': token}) The layout holds the shapes, so we dump all the shape information there.We'll update the layout via streaming later.layout = {'width': 800, 'height': 800, 'autosize': False, fig = {'data': [trace0], 'layout': layout} This is the important part. You can use the
|
Hello - In the following plot - how do I make the star marker appear above the Thanks On Thu, Dec 31, 2015 at 3:44 PM, Andrew [email protected] wrote:
|
@cloaked123 , there's no current way to do that right now. There's an open issue for it in the plotly.js repo though: |
Closing this down as it's not related to the python api at this point. |
Thanks On Wed, Jan 6, 2016 at 2:00 PM, Andrew [email protected] wrote:
|
Hi - is there a streaming example for a circle shape plot? In this example : https://plot.ly/python/shapes/#circle
trace0 = go.Scatter(
x=[1.5, 3.5],
y=[0.75, 2.5],
text=['Unfilled
Circle', 'Filled
Circle'],
mode='text',
)
How do I declare this for streaming? Will x and y be 2 dimensional arrays? For a line graph I normally declare like this:
trace_ctr = Scatter(
x=[],
y=[]
)
How do I do it for a circle?
The text was updated successfully, but these errors were encountered: