Hi, I’m using the following code to create a plot:
def create_time_series(df):
return {
'data': [go.Scatter(
x=df['date'],
y=df['data'],
mode='lines+markers',
showlegend=False
)],
'layout': {
'title': '',
'height': 300,
'margin': {'l': 100, 'b': 30, 'r': 10, 't': 50},
'annotations': [{
'x': 0, 'y': 0.85, 'xanchor': 'left', 'yanchor': 'bottom',
'xref': 'paper', 'yref': 'paper', 'showarrow': False,
'align': 'left', 'bgcolor': 'rgba(255, 255, 255, 0.5)'
}],
'yaxis': {'type': 'linear', 'title': ''},
'xaxis': {'showgrid': False, 'tickformat': '%Y-%m-%d', 'title': ''}
}
}
For some reason it creates a weird text/annotation and I don’t understand why:
Does anyone have any idea why it occurs?
Thanks