Hello,
I am trying to add an annotation at the bottom of the graph using paper ref.
The sample code:
import plotly.graph_objects as go
fig = go.Figure()
fig.add_trace(go.Scatter(
x=[1, 2, 3],
y=[1, 2, 3],
name="y"))
list = [(115,1.945250, 1.179534),(1.925343,2.050340, 1.235351)]
annotation_text = ''
for x,y,z in list:
row =f"Data: {x:<15}Value1: {y:<15.4f}Value2: {z:<15.4f}<br>"
annotation_text += row
print(row)
fig.update_layout(width=500, autosize=False)
fig.add_annotation(dict(text=annotation_text ,
yanchor='top',
x=0,
y=-0.1,
showarrow=False,
xref="paper",
yref="paper",
font={'size':11}))
fig.show()
The result:
and I want to get an output similar to printed rows:
Data: 115 Value1: 1.9452 Value2: 1.1795 <br>
Data: 1.925343 Value1: 2.0503 Value2: 1.2354 <br>
Thanks.