Thanks very much for this excellent tutorial, the best thing about it is that you go deep explaining each line of code you write unlike most tutorials I found
@@KimberlyFessel how can i change size of plots together ? if i use plt.figure(figsize=(20, 15)) its change only first plot if i use it before swarmplot too then its replace violine plot
Hi, thanks for the informative video! I have a question about swarm plots. Do you know how to add a line representing the mean on top of the swarm plot? For example, at 4:21 in your video, could one add a horizontal line at the mean horsepower for each origin-cylinder combination? Thanks!
Interesting question! Don't think the swarmplot has anything built-in to handle this. But you could potentially plot a boxplot or maybe even a barplot on the same figure as your swarmplot. That would show you the median, 25th, and 75th percentiles. You could alternatively plot individual horizontal lines using axhline, but it gets a little tricky to get the right y positions (through a pandas groupby?) and to also put those in the right locations (xmin and xmax in axhline require scaled positional values ranging between 0 and 1).
Thank you for super useful and detailed tutorial. One question on swarmplot - you begin from a set of natural number and you make swarmplot look like histogram with bin width = 1. But how does it work when you are dealing with data points that are float type - is there some/same type of binning involved?
Thanks very much for this excellent tutorial, the best thing about it is that you go deep explaining each line of code you write unlike most tutorials I found
Fantastic -- glad you enjoyed it!
@@KimberlyFessel how can i change size of plots together ?
if i use
plt.figure(figsize=(20, 15))
its change only first plot
if i use it before swarmplot too then its replace violine plot
Very good explanation Kim, looking for more of your tutorials on Python. Keep up the good work !!!
Glad you enjoyed it -- will do!
Wow! Thanks for this! Very nicely explained.
Thank you! Glad you enjoyed it. 😄
Hi, thanks for the informative video! I have a question about swarm plots. Do you know how to add a line representing the mean on top of the swarm plot? For example, at 4:21 in your video, could one add a horizontal line at the mean horsepower for each origin-cylinder combination? Thanks!
Interesting question! Don't think the swarmplot has anything built-in to handle this. But you could potentially plot a boxplot or maybe even a barplot on the same figure as your swarmplot. That would show you the median, 25th, and 75th percentiles. You could alternatively plot individual horizontal lines using axhline, but it gets a little tricky to get the right y positions (through a pandas groupby?) and to also put those in the right locations (xmin and xmax in axhline require scaled positional values ranging between 0 and 1).
Thank you for super useful and detailed tutorial. One question on swarmplot - you begin from a set of natural number and you make swarmplot look like histogram with bin width = 1. But how does it work when you are dealing with data points that are float type - is there some/same type of binning involved?
Thanks for the explanation.
You are very welcome!
Absolutely excellent 👏thank u
You're very welcome -- glad you enjoyed!
Helpful❤