Hi, Iโm following this tutorial to create a chord graph.
I replaced
import plotly.plotly as py
with
from chart_studio import plotly as py
since plotly.plotly is deprecated.
The actual problem is that even though I followed literally the guide, an error occurs that tells me a map object is not subscriptable (that is true).
In this case, the Weights variable is subscripted inside the for loop (line starting with >>>)
Weights= map(int, G.es["weights"])
...
for j, e in enumerate(E):
...
pts=BezierCv(b, nr=5)
>>> text=V[e[0]]['label']+' to '+V[e[1]]['label']+' '+str(Weights[j])+' pts'
mark=deCasteljau(b,0.9)
...
Probably the tutorial used python2, but in python3 maps are not subscriptable anymore. The problem is that I donโt really know how to define Weights in python3 in order to obtain the same script behavior.
Do you know any solution?
Or is there a newer guide on this same topic?
Yes, I noticed it was for python2 thatโs why Iโm looking for an alternative way to use the map() function since itโs different between the 2 versions. There is no guide for v4 as stated here.
My question is if anyone of you knows a workaround for this problem.