100 likes | 231 Views
Seaborn is a Python data visualization library based on matplotlib. Some basics of seaborn are highlighted in this tutorial along with some characteristics. Distplot function is discussed in detail. To learn more about trending data science courses, artificial intelligence, or machine learning <br>visit:http://bit.ly/DatascienceCourse
E N D
Introduction • Seaborn is a Python statistical graphics library. • It builds on top of matplotliband incorporates data structures closely with pandas. • Seaborn allows you to explore and understand your data. • Its plotting functions work on data frames and arrays containing entire datasets and internally perform the necessary semantic mapping and statistical aggregationfor the development of informative plots. • It makes the charts more appealing and promotes some of the common needs for data visualisation (like mapping a color to a variable). • Importing seaborn: import seaborn as sns • To check the version of seaborn on your system: print(sns.__version__)
Various Plots in Seaborn • Wide range of plots can be plotted using seaborn for visualization. • Here are some of them: • Univariate Data: Plotting a graph for single variable • Distplot • Rug Plot 2. Bivariate Data: Plotting a graph for 2 variables • Scatter Plot • Hexbin Plot • Kde Plot • Co-relation
Distplot • Distplot stands for distribution plot, it takes as input an array and plots a curve corresponding to the distribution of points in the array. • We will be using distplot() function for this purpose. • The output plot will have basically 2 graphs: 1.Histogram 2.kde curve-kernel density • Eg:importmatplotlib.pyplot as pltimport seaborn as snssns.distplot([0, 1, 2, 3, 4, 5])plt.show()
Histogram • O/P: Kde curve
We can also separately visualize both the plots. • sns.distplot([0, 1, 2, 3, 4, 5],kde=False)only histogram curve will be observed. • sns.distplot([0, 1, 2, 3, 4, 5],hist=False) only kde curve will be observed.
THANKS FOR WATCHING! • Follow us on our Social Media Platforms: • Instagram: • Facebook: • LinkedIn: • Twitter: • Or, Contact us: contacts@learnbay.co