ChrisDevWard
ChrisDevWard

Reputation: 965

Dynamically updating Plotly Graph Title

Like the title says, is there any way to dynamically update a plotly graph's title? I would like to be able to change the graph's title with data state changes for my streaming graph.

Regards

Upvotes: 0

Views: 1445

Answers (1)

theengineear
theengineear

Reputation: 957

You can add a second dict for the layout parameter which will allow you to do what you're asking:

your_stream.write({'y': 2}, {'title': 'i am dynamic'})

Here are the pertinent lines in the GitHub repo: https://github.com/plotly/python-api/blob/master/plotly/plotly/plotly.py#L448-487

Try doing this for more info:

import plotly.plotly as py
help(py.Stream)

Upvotes: 1

Related Questions