I have a dataframe in which I have x and y values to be plotted using seaborn library. But the cache here is that I need to color the background with multiple colors based on the data points I already have. for example
# df - represents the dataframe in which the x and y data are present
split_points = [20,40,60,80,100] # The list of split point, the list can be bigger as well ( keeping it same with the example)
sns.scatterplot(...) # I need help with this to get the below specified graph
The snippet of code looks something like above. But I would typically like to get the split of all the points mentioned in the split_points list as different background colors. Hoping to find the method to do the same.
I intend to do something like this.
I have taken the image from this answer for better understanding.