I would have a following code that generates this lineplot:
But I would like to sort x axis to have
1, 2, 3, 0, 4, 5, 6, 7, 8, 9
. Moreover, I need to have 0 in the 4/5 between 3 and 4. I tried this:
df_sort = df.sort_values( "ab_test", key=lambda col: col.map( { "0": 14, # see how I insert 0 between 3 and 4 "1": 0, "2": 5, "3": 10, "4": 15, "5": 20, "6": 25, "7": 30, "8": 35, "9": 40, } ), )
But when I try to plot it using:
sns.lineplot(x="ab_test", y="count", data=abtest_sort, hue="cena_percentil")
it gives me the same result as before. How can I fix it, please?