I really thought I could do this with seaborn.tsplot . But this is not entirely correct. Here is the result that I get from the seabed:
cluster_overload = pd.read_csv("TSplot.csv", delim_whitespace=True) cluster_overload['Unit'] = cluster_overload.groupby(['Cluster','Week']).cumcount() ax = sns.tsplot(time='Week',value="Overload", condition="Cluster", ci=100, unit="Unit", data=cluster_overload)
Outputs:

I am really confused about why the unit parameter is necessary, as I understand that all data is aggregated based on (time, condition) Seaborn Documentation defines unit as
A field in a DataFrame that identifies a sample block (e.g., subject, neuron, etc.). The representation of the error will be destroyed units at each observation of the time / condition. This has no role when the data is an array.
I am not sure about the meaning of βcollapsing,β especially because my definition will not become a mandatory variable.
In any case, the conclusion here is, if you want exactly what you discussed, it is not so beautiful. I'm not sure how to manually shade in these regions, but please share if you find out.
cluster_overload = pd.read_csv("TSplot.csv", delim_whitespace=True) grouped = cluster_overload.groupby(['Cluster','Week'],as_index=False) stats = grouped.agg(['min','mean','max']).unstack().T stats.index = stats.index.droplevel(0) colors = ['b','g','r'] ax = stats.loc['mean'].plot(color=colors, alpha=0.8, linewidth=3) stats.loc['max'].plot(ax=ax,color=colors,legend=False, alpha=0.3) stats.loc['min'].plot(ax=ax,color=colors,legend=False, alpha=0.3)
Outputs: 