Reputation: 1
I'm trying to make a scatter plot that allows me to do a couple things:
Here is some of the data:
Date x y 2024-10-09 0.08 4.83 2024-10-16 0.01 4.83 2024-10-23 0.28 4.83 2024-10-30 0.24 4.83 2024-11-06 0.32 4.83 2024-11-13 0.64 4.62 2024-11-20 0.62 4.58 2024-11-27 0.49 4.58 2024-12-04 0.39 4.58 2024-12-11 0.52 4.58
The basic scatter plot works:
fig = px.scatter(df, x="x", y="y", width=600, height=600,
range_x=[df['x'].min(), df['x'].max()], range_y=[df['y'].min(), df['y'].max()])
I set the min and max because eventually I will later move the origin to the median values of x and y.
fig.update_layout(xaxis=dict(rangeslider=dict(visible=True), type="date"))
Thanks for any help.
Upvotes: 0
Views: 29