Hi @nhusain,
For the documentation examples that aren’t working, could you open an issue with the documentation repo at https://github.com/plotly/documentation/issues (the docs are all open source too). A link to the doc page and a copy of the error message you’re seeing is enough.
For your particular example, if you’re creating plots with that many points you’ll need to use the webgl accelerated scattergl
trace type. You can do this by setting 'type': 'scattergl'
in each trace dict
. For example:
fig = {
'data': [
{
'type': 'scattergl',
'x': dfhp.I_Begin,
'y': dfhp.Identity,
'text': dfhp.ReadName,
'mode': 'markers',
'name': 'Helicobacter_Pylori'},
...
It looks like you figured out that the import plotly.plotly as py
is needed, are you still having problems displaying the figure?
Also, you may be able to create this figure by looping over the unique values of df.Name using an approach like Similar to seaborn's hue function in plotly. (you would use fig.add_scattergl
rather that fig.add_scatter
)
Hope that helps,
-Jon