import plotly.express as px import plotly.graph_objects as go error_band_width = 0.25 y_lower = [x * (1 - error_band_width) for x in forecast_y] y_upper = [x * (1 + error_band_width) for x in forecast_y] fig = px.bar(revenue, x='date_month', y='revenue', color='revenue_type', color_discrete_sequence=px.colors.qualitative.T10) fig.add_trace(go.Scatter(x=forecast_x, y=forecast_y, mode='lines', name='Forecast 🚀', line={'color': '#72B7B2'})) fig.add_trace(go.Scatter(x=forecast_x+forecast_x[::-1], y=y_upper+y_lower[::-1], fill='toself', fillcolor='rgba(114,183,178,0.3)', line=dict(color='rgba(255,255,255,0)'), hoverinfo="skip", showlegend=False)) fig.update_layout(legend=dict(yanchor="bottom", y=1.02, xanchor="right", x=1) ) fig.show()

Execution error

NameError: name 'forecast_y' is not defined
Hosted onDeepnote