1 / 10

SEABORN PART 2

There are numerous ways to plot data using Matplotlib. Rug plot for univariate data is a method that allows plotting the distribution for a single variable. Also, there are various methods to plot bivariate data. Some of them like the scatter plots and hexbin plot are discussed in this tutorial.<br>To learn more visit: http://bit.ly/DatascienceCourse<br>

Download Presentation

SEABORN PART 2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Rug Plot • A rug plot is a plot of data for a single quantitative variable, displayed as marks along an axis. It is used to visualise the distribution of the data • Eg:hist = sns.distplot(pokemon_data['Attack Point'], rug = True)hist.set_title('Attack capability with Density and Rug plot')hist.set_xlabel('Attack')plt.show()

  2. O/P:

  3. Plotting Bivariate Data • Plotting of data with 2 variables is also possible. • Different plots that can be plotted for bivariate data are: 1.Scatter plot 2.Hexbin plot 3.kdeplot 4.Corelation

  4. Scatter Plot • jointplot() function is used to plot thescatter plot for bivariate data. • It is also possible to have the limit for x axis and y axis. • Eg:sns.jointplot(x ='Attack Point',y ='Defense Point', data = pokemon_data)plt.show()

  5. O/P:

  6. Adding the limit to axes. • Eg:sns.jointplot(x = 'Attack Point', y ='DefensePoint',data = pokemon_data,xlim = {0,450},ylim = {0,200})plt.show() • O/P:

  7. Hexbin Plot • A Hexbin plot is useful to depict the relationship of 2 numerical variables when you have a lot of data point. Instead of overlapping, the plotting window is split in multiple hexbins, and the number of points per hexbin is counted. This number of points is denoted by the colour. • Darker the shade of the hexagon more are the data points in that region. • Eg:withsns.axes_style('white'):sns.jointplot(x ='Attack Point', y ='Defense Point',                   data = pokemon_data,  kind ='hex',color ='r')

  8. O/P:

  9. THANKS FOR WATCHING! • For more such content follow us on our social media platforms: • Instagram: learnbay_datascience • Facebook: Learnbay • LikedIn: Learnbay • Twitter:Learnbay1 • Or,reach us by mail: contacts@learnbay.co

More Related