Seaborn swarmplot | What is a swarm plot and how do you make a swarmplot with Python seaborn?

Поделиться
HTML-код
  • Опубликовано: 23 дек 2024

Комментарии • 15

  • @MohamedSayed-ty3wn
    @MohamedSayed-ty3wn 4 года назад +2

    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
      @KimberlyFessel  4 года назад

      Fantastic -- glad you enjoyed it!

    • @girrra1233
      @girrra1233 2 года назад

      @@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

  • @alexngo9848
    @alexngo9848 4 года назад +1

    Very good explanation Kim, looking for more of your tutorials on Python. Keep up the good work !!!

  • @prasadchimalwar3951
    @prasadchimalwar3951 3 года назад

    Wow! Thanks for this! Very nicely explained.

  • @samuelcockey9294
    @samuelcockey9294 3 года назад

    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!

    • @KimberlyFessel
      @KimberlyFessel  3 года назад +1

      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).

  • @jantonisito
    @jantonisito 3 года назад

    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?

  • @manoelflavioleal1934
    @manoelflavioleal1934 3 года назад

    Thanks for the explanation.

  • @sreenathsj4064
    @sreenathsj4064 3 года назад

    Absolutely excellent 👏thank u

    • @KimberlyFessel
      @KimberlyFessel  3 года назад +1

      You're very welcome -- glad you enjoyed!

  • @csswatheshson1563
    @csswatheshson1563 Год назад

    Helpful❤