plotly graph edge label
<p>I want to add label to Graph in <code>plotly</code>. I wrote a program like this but it doesn't work</p>

<pre><code>edge_trace = Scatter(
    x=[],
    y=[],
    line=Line(width=3, color='rgba(136, 136, 136, .8)', text=[]),
    hoverinfo='none',
    text='',
    mode='lines')

for edge in G.edges():
    x0, y0 = pos[edge[0]]
    x1, y1 = pos[edge[1]]
    edge_trace['x'] += [x0, x1, None]
    edge_trace['y'] += [y0, y1, None]
    edge_trace['line']['text'].append('label')
</code></pre>

<p>I got the following error:</p>

<pre><code>    raise exceptions.PlotlyDictKeyError(self, path)
    plotly.exceptions.PlotlyDictKeyError: 'line' is not allowed in 'line'
</code></pre>

<p>What can I do?</p>