I have the following dataframe in pandas:
data = {
'idx': [1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10],
'hue_val': ["A","A","A","A","A","A","A","A","A","A","B","B","B","B","B","B","B","B","B","B","C","C","C","C","C","C","C","C","C","C",],
'value': np.random.rand(30),
}
df = pd.DataFrame(data)
Now I want to have a line plot with the cumulative sum over the value by following the "idx" for each "hue_val". So in the end it would be three curves going strictly up (since they are positive numbers), one for "A", "B" and "C".
I found this code in several sources:
sns.lineplot(x="idx", y="value", hue="hue_val", data=df, estimator="cumsum")
That is not doing the trick, since both the curve and the x-axis are false: