Here is the explanation of the preceding code:
- order=day_order specifies the order in which unique values of the categorical variable are to be plotted on the axis.
- jitter=0.05 specifies the amount of jitter to be applied; the larger the value, the longer the range around the straight line.
- kind='strip' specifies the type of the plot, which in this case is stripplot(). However, this is the default type for catplot(), so it can be omitted as well.
- You can pass the dodge=True argument, if you want to plot hue variable values separately side by side, instead of both colors on the same strip. For stripplot(), dodge=False is the default, which is what we have used here.
- data=snacks_sales.query("daywk != 'Thursday'") filters input ...