I would like to plot a line with a range around it, like on this photo:
I posted an original question, but didn't specify the index being a datetime index. I thought it wouldn't be important, but I was wrong.
There is an answer that covers it with a numerical index:
Plotly: How to make a figure with multiple lines and shaded area for standard deviations?
and documentation here:
https://plotly.com/python/continuous-error-bars/
but the issue of datetime index is not covered.
Here is some test data:
timestamp price min mean max
1596267946298 100.0 100 100.5 101
1596267946299 101.0 100 100.5 101
1596267946300 102.0 98 99.5 102
1596267948301 99.0 98 99.5 102
1596267948302 98.0 98 99.5 102
1596267949303 99.0 98 995. 102
where I'd like the band to cover from min to max and the mean to be drawn in the center.
another option is to take the code from the first answer of the question posted above (Plotly: How to make a figure with multiple lines and shaded area for standard deviations?) and change the data generation to:
index = pd.date_range('1/1/2000', periods=25, freq='T')
df = pd.DataFrame(dict(A=np.random.uniform(low=-1, high=2, size=25).tolist(),
B=np.random.uniform(low=-4, high=3, size=25).tolist(),
C=np.random.uniform(low=-1, high=3, size=25).tolist()),
index=index)
this will work the same way but create a datetime index.