Seaborn jointplot | What is a joint plot and how to code a jointplot in Python Seaborn

Поділитися
Вставка
  • Опубліковано 29 вер 2024

КОМЕНТАРІ • 71

  • @andreazecchi812
    @andreazecchi812 3 роки тому

    Top, as usually! Thanks so much, Kimberly👋

    • @KimberlyFessel
      @KimberlyFessel  3 роки тому

      Hi -- thank you and thanks for stopping by! 👋

  • @das2222
    @das2222 3 роки тому

    Thank you so much Kimberly... This is amazing...

  • @jaredagravante9523
    @jaredagravante9523 2 роки тому +1

    What would I do if I only wanted to see the geysers that are 'Long' or only the geysers that are 'Short'?

  • @mazhariqbal29
    @mazhariqbal29 3 роки тому

    thank you

  • @gauthamambethkar4483
    @gauthamambethkar4483 3 роки тому +2

    Best Tutorial for Seaborn on UA-cam. Keep up the great work Kimberly.

  • @AliMBaba-do2sl
    @AliMBaba-do2sl 3 роки тому

    Thank you for the very informative videos. I have just recently came across your videos while trying to display spatial data that contain anomalies in either y direction, x direction or both. Can you kindly suggest which plot I should adopt.

    • @KimberlyFessel
      @KimberlyFessel  3 роки тому +1

      Most welcome! I think you're on the right track here. The jointplot would be able to show you your data's marginal distributions as well as the joint distribution, so you should be able to see anomalies in either the x- or y-directions. A bivariate KDE plot would be good to look for outliers that don't cluster with your other values, and you could plot that on the center part of the jointplot. You might also consider trying boxplots since they alert you to outlying values. But there you would need to plot the x- and y- directions separately to look for outliers.

  • @aishikroychaudhury8656
    @aishikroychaudhury8656 3 роки тому

    Nice video. I have the following questions.
    If my hue column had many values and I want to know which colour means which value then what to do?
    Also, if I want to change the bin widths of the marginal histograms, then what should I do?

    • @KimberlyFessel
      @KimberlyFessel  3 роки тому +1

      Great questions! Seaborn should include a legend for you by default, which will show you what each color means. If it doesn't add a legend by default, you could try adding legend=True as one of your keyword arguments within the jointplot function.
      And regarding the histogram bin widths, you can set these through the marginal_kws argument. For example, add sns.jointplot(..., marginal_kws={'binwidth': 10}). (Assuming you have the most recent version of Seaborn >= 0.11.0)

  • @I_hate_charlatans_like_mkbhd
    @I_hate_charlatans_like_mkbhd 5 місяців тому

    Nice one ezpz

  • @ecemgungor6208
    @ecemgungor6208 Рік тому

    Hello! Is it possible to plot joint probability for three variables? I have been looking for an answer for a couple of days, however, I could not find any python library for that. Do you have any suggestion/idea?

  • @comradefoodie3945
    @comradefoodie3945 3 роки тому +3

    Thank you for this series, very helpful, with your help now I know how to read the plot too, lots of love!!

  • @topfundus1093
    @topfundus1093 3 роки тому +1

    Hello Kimberly,
    thank you for the excellent tutorials on Seaborn. Have followed them all on the computer.
    One question about this: How can I insert formula text into the graphs? For example, I would like to include the linear regression formula as text in Seaborn graphs.
    Thanks for your help already here.
    Vielen Dank und viele Grüße aus D.
    Kurt

    • @KimberlyFessel
      @KimberlyFessel  3 роки тому +1

      Hi - great question. Seaborn does not currently have an automatic way to do this, but if you know what the formula is, you can add it through matplotlib pyplot's text function. So after you create the joint plot, add:
      plt.text(x, y, formula)
      where x and y are the x and y positions where you want the text to go and formula is your formula string. You can also use TeX to write the formula using TeX commands if you'd like. I have a few other videos that may be helpful: plt.text (ua-cam.com/video/NBYzSaTbodM/v-deo.html) and TeX for matplotlib (ua-cam.com/video/9473Sr7l8iY/v-deo.html). Cheers!

  • @DoubleMagnet
    @DoubleMagnet 2 роки тому

    How would we make a joinplot of only the "long" data?

  • @pasumarthiashik1099
    @pasumarthiashik1099 2 роки тому

    this is about , each variable is dependent on one another right.

  • @iamritish
    @iamritish 2 роки тому

    hoe to change the marker style for two different data?

  • @johnbainbridge1931
    @johnbainbridge1931 Рік тому

    Hi, thanks for this great lesson on joint plots. I applied your method to the data we are using but noticed that for kind = 'hist' seaborn was giving us (you and me) very different default bin sizes. I must have at least 50 while you have about 10. Why might that be and how to take control over this?

    • @KimberlyFessel
      @KimberlyFessel  Рік тому

      Hey there! You can past information about the bins through to marginal_kws. For example, add the property marginal_kws={'bins': 20} to make 20 bins.

  • @mprojcas1
    @mprojcas1 3 роки тому

    Is there any other library in python that allows graphics like this? Also, I'm trying to do plt.subplots with sns.jointplot on the axes but is not working :(

    • @KimberlyFessel
      @KimberlyFessel  3 роки тому

      The most common Python libraries for building graphics like these are matplotlib and seaborn. There's also pygal and altair or perhaps GeoPandas for mapping. If you'd like to add interactivity, Plotly and bokeh are nice. Regarding the subplots on the jointplot, the joinplot is based upon the JointGrid, which is already constructed of matplotlib subplots. This means the jointplot will not allow you to add additional subplots to its components. You can access the individual subplots of the jointplot by saving it's return object and then accessing the .ax_joint, .ax_marg_x, or .ax_marg_y components. So maybe you could do something fancy by updating those directly, but it would take some work!

  • @gama3181
    @gama3181 2 роки тому

    Wow !!!! i just found you channel and is incredible! Thanks)] :)

    • @KimberlyFessel
      @KimberlyFessel  2 роки тому

      Oh thank you! Welcome - and glad you are enjoying my channel!

  • @pasumarthiashik1099
    @pasumarthiashik1099 2 роки тому

    on what basis histogram is ploted

  • @fatmashaban1131
    @fatmashaban1131 2 роки тому

    Thanks a lot, Kimberly.
    Is there a way to plot multiple plots (multiple x,y) in one graph using joinplot??? since hue is not working for multiple tables

  • @vivekjoshi3769
    @vivekjoshi3769 Рік тому

    This video is really comprehensive! Thanks for making it!!
    I have a small question. What software do you use for editing your videos?
    I am looking for tools to start creating video content.

  • @bubblebath2892
    @bubblebath2892 3 місяці тому

    Great work , thnks for sharing with us

  • @tadimlikturkuler
    @tadimlikturkuler 3 роки тому

    Thanks for videos, I have some questions.
    1 - How can I get plotted values, so the joint probability density values as a data or matrix?
    2 - How can I calculate probability density function for three random variables?

  • @thepresistence5935
    @thepresistence5935 3 роки тому

    one request I post some words if you searched in google means you will amaze @Kimberly Fessel.
    smile marker for seaborn -- just copy-paste and tell what happened..

    • @thepresistence5935
      @thepresistence5935 3 роки тому

      you can see the beautiful smile of our professor.

    • @KimberlyFessel
      @KimberlyFessel  3 роки тому +1

      Seaborn is my favorite! 😄Looks like Google knows that now... 😂

    • @thepresistence5935
      @thepresistence5935 3 роки тому

      @@KimberlyFessel Google knows everything !

  • @Patiencelad
    @Patiencelad Рік тому

    Great stuff. Thanks Kimberly!

  • @chandu-mu2cg
    @chandu-mu2cg 3 роки тому

    can you please upload more videos on seaborn.

    • @KimberlyFessel
      @KimberlyFessel  3 роки тому

      For sure! I'm planning to do a video about the new displot soon. The rest of my Seaborn videos can be found here: ua-cam.com/play/PLtPIclEQf-3cG31dxSMZ8KTcDG7zYng1j.html

  • @patnababu1257
    @patnababu1257 3 роки тому

    mam can u please upload video on facegrid, pairgrid and lmplot. Thank you for this awesome series

    • @KimberlyFessel
      @KimberlyFessel  3 роки тому

      So glad you are enjoying the series, and yes, I do plan to make videos on the FacetGrid, PairGrid, and lmplot!

  • @darijozivkovic7931
    @darijozivkovic7931 3 роки тому

    More about Seaborn, please.

    • @KimberlyFessel
      @KimberlyFessel  3 роки тому

      You got it! Planning videos for the new displot and the lmplot soon. The rest of my Seaborn videos can be found here: ua-cam.com/play/PLtPIclEQf-3cG31dxSMZ8KTcDG7zYng1j.html

  • @AI_For_Scientists
    @AI_For_Scientists 2 роки тому

    Thank you, great video.

  • @flowing_dance
    @flowing_dance 3 роки тому

    Amazing video!

  • @stefanietremblay2636
    @stefanietremblay2636 3 роки тому

    Thank you so much for your videos! I have a few questions however;
    1) Is it possible to change the type of the marginal plots only (I would like my main plot to be a hexbin 2d histogram and the marginal plots to be KDE)?
    2) How can I add a colorbar to a joint plot? The usual "cmap" doesn't work with the JointGrid object.

    • @KimberlyFessel
      @KimberlyFessel  3 роки тому +1

      Hi there - great questions! For #1, you will want to check out the JointGrid. It's much more flexible than the jointplot. And I now have a video about it here: ua-cam.com/video/t3G078DWXBM/v-deo.html
      For #2: I haven't tried adding a colorbar to a jointplot, but it looks like it accepts an argument called "cbar" for some plot types; just set cbar=True in the jointplot. You can go on to adjust it or move it from there like in this resource: stackoverflow.com/questions/60845764/colorbar-for-sns-jointplot-kde-style-on-the-side

  • @anneborgstrom9252
    @anneborgstrom9252 3 роки тому

    Thank you for these videos! I am a true beginner. And got confused when you end many rows with ; When do you use " ; " is it optional or does it come with Seaborn?

    • @KimberlyFessel
      @KimberlyFessel  2 роки тому

      Such a great question! The ; is really just there to suppress the automatic output in Jupyter Notebook; it is optional. You can learn more about the semicolon in Python in my explanation here: ua-cam.com/video/B3M5ETKHEOY/v-deo.html

  • @netrakumarmanandhar6765
    @netrakumarmanandhar6765 7 місяців тому

    This is amazing! Thanks!

    • @KimberlyFessel
      @KimberlyFessel  7 місяців тому

      Most welcome! Glad you liked it 👍

    • @netrakumarmanandhar6765
      @netrakumarmanandhar6765 7 місяців тому

      @@KimberlyFessel Loved your videos and learned a lot! Could you please develop videos or a complete Playlist on Plotly.

  • @gpt_haseeb
    @gpt_haseeb 3 роки тому

    We should support women in tech. Heads of to you . And i love you

  • @samruddhideshmukh5928
    @samruddhideshmukh5928 3 роки тому

    Very helpful seaborn series!! Loving it!!!

    • @KimberlyFessel
      @KimberlyFessel  3 роки тому

      Awesome - so glad these videos have been helpful!

  • @harishgunasekaran
    @harishgunasekaran 3 роки тому

    Wow, definitely very useful than reading the page. Is it possible to extract those "clusters" points from the kde plot?
    For instance I just want the points (cluster) only inside the core circle shown at 4:51.

    • @KimberlyFessel
      @KimberlyFessel  3 роки тому +1

      Thanks, glad you enjoyed! KDE doesn't do clustering; it just provides an estimate for the probability density function. So I can't think of a super easy way to do this. Seaborn's KDE uses scipy's Gaussian KDE: docs.scipy.org/doc/scipy/reference/generated/scipy.stats.gaussian_kde.html#scipy.stats.gaussian_kde You could potentially use scipy to build a KDE with your data and then maybe filter down to the group you want based on those numeric values. But like I said -- not super simple! (Though interestingly enough, these geyser data have already been clustered with KMeans. That's what the "kind" column indicates: "short" and "long" clusters. So you could just filter based on one cluster or the other for this example. 😄)

    • @harishgunasekaran
      @harishgunasekaran 3 роки тому +1

      @@KimberlyFessel Great! Thank you, Dr. Kimberly, for your didactic support! :)

  • @lawrencetaulk7898
    @lawrencetaulk7898 3 роки тому

    nice video, thank you teacher, great person.

    • @KimberlyFessel
      @KimberlyFessel  3 роки тому

      Awww -- thank you! Glad to hear you liked the video. 😄

  • @sobersabin
    @sobersabin 3 роки тому

    excellent seaborn tutorial so far , i have ever seen

  • @darijozivkovic7931
    @darijozivkovic7931 3 роки тому

    Awesome educator!!!!

  • @t.t.cooperphd5389
    @t.t.cooperphd5389 3 роки тому

    Thank you so much!!!