Page 1 of 1

Plotly Legend -Titel

Posted: 05 Mar 2025, 07:31
by Anonymous
Ich möchte im folgenden Code in der Lage sein, der Legende einen Titel hinzuzufügen. Wenn ich mir jedoch die Dokumente ansieht, denke ich nicht, dass es eine Methode dafür gibt. < /P>

Code: Select all

import plotly.plotly as py
import plotly.graph_objs as go

trace0 = go.Scatter(
x=[1, 2, 3, 4, 5],
y=[1, 2, 3, 4, 5],
)

trace1 = go.Scatter(
x=[1, 2, 3, 4, 5],
y=[5, 4, 3, 2, 1],
)

data = [trace0, trace1]
fig = go.Figure(data=data)

py.iplot(fig, filename='default-legend')