The below code plots a zeroline. I would like the zeroline to be a different color (e.g., red) when the x-axis is less than 0.5 and green if greater than 0.5. Can I do this with zeroline? If not, suggestions on approach?
fig = go.Figure()
# Adds the two dots
fig.add_trace(go.Scatter(
x=[0.3, 0.6], y=[0,0], mode='markers', marker_size=20,
))
fig.update_xaxes(showgrid=False)
fig.update_yaxes(showgrid=False,
zeroline=True,
zerolinecolor='black',
zerolinewidth=3,
showticklabels=False)
fig.update_layout(height=200, plot_bgcolor='white')

