<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Seaborn | Ukant Jadia</title><link>https://ukantjadia.github.io/tag/seaborn/</link><atom:link href="https://ukantjadia.github.io/tag/seaborn/index.xml" rel="self" type="application/rss+xml"/><description>Seaborn</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Sat, 30 Dec 2023 14:23:16 +0530</lastBuildDate><image><url>https://ukantjadia.github.io/media/icon_hu5e29e1df12b63ca0c9252c8db4842f1b_8915_512x512_fill_lanczos_center_3.png</url><title>Seaborn</title><link>https://ukantjadia.github.io/tag/seaborn/</link></image><item><title>Learn Visualization With Seaborn</title><link>https://ukantjadia.github.io/post/learn-visiualization-with-seaborn/</link><pubDate>Sat, 30 Dec 2023 14:23:16 +0530</pubDate><guid>https://ukantjadia.github.io/post/learn-visiualization-with-seaborn/</guid><description>&lt;h1 id="seaborn-tutorial">Seaborn Tutorial&lt;/h1>
&lt;blockquote>
&lt;p>&lt;strong>IMPORTANT&lt;/strong>
Que: What is Probability Density of Data?
Ans: The Probability Density of Data refers to the likelihood of a certain value or range of values occurring within a dataset.
It is mathematical function that describes the distribution of the data and can be used to make prediction
and to understand the underlying patterns and relationship within the dataset.&lt;/p>
&lt;/blockquote>
&lt;blockquote>
&lt;p>&lt;strong>Note&lt;/strong>
Python notebook containing all plots with various parameter can be obtain from [here]&lt;/p>
&lt;/blockquote>
&lt;hr>
&lt;h2 id="setup">Setup&lt;/h2>
&lt;p>Install the &lt;a href="https://matplotlib.org/" target="_blank" rel="noopener">matplotlib&lt;/a> and &lt;a href="https://seaborn.pydata.org/" target="_blank" rel="noopener">seaborn&lt;/a> in your editor or notebook by using following commands&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-python" data-lang="python">&lt;span class="line">&lt;span class="cl">&lt;span class="n">pip&lt;/span> &lt;span class="n">install&lt;/span> &lt;span class="n">seaborn&lt;/span> &lt;span class="c1"># to install in termianl &lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="n">pip&lt;/span> &lt;span class="n">install&lt;/span> &lt;span class="n">matplotlib&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="err">!&lt;/span>&lt;span class="n">pip&lt;/span> &lt;span class="n">install&lt;/span> &lt;span class="n">seaborn&lt;/span> &lt;span class="c1"># to install in notebook&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="err">!&lt;/span>&lt;span class="n">pip&lt;/span> &lt;span class="n">install&lt;/span> &lt;span class="n">matplotlib&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="n">conda&lt;/span> &lt;span class="n">install&lt;/span> &lt;span class="n">seaborn&lt;/span> &lt;span class="c1"># to install in conda env &lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="n">conda&lt;/span> &lt;span class="n">install&lt;/span> &lt;span class="n">matplotlib&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h1 id="plots">Plots&lt;/h1>
&lt;h2 id="distribution-plots">Distribution Plots&lt;/h2>
&lt;h3 id="joint-plot">Joint Plot&lt;/h3>
&lt;p>Joint Plot is a combination of scatter plot and a histogram or kernel density estimate (KDE) plot to display the distribution of one variable along the x-axis and the distribution of another variable on y-axis.
It allows to visualize the relationship between two variables.&lt;/p>
&lt;h3 id="kde-plot">KDE Plot&lt;/h3>
&lt;p>Kernel Density Estimation is a graphical representation of the probability density function of a continuous random variable.
It uses a smoothed line to show how often different values appear in the dataset.
It is a non-parametric method(it does not make any assumptions about the underlying distribution of data.)&lt;/p>
&lt;h3 id="pair-plot">Pair Plot&lt;/h3>
&lt;p>Also known as Scatter plot matrix.
A pair plot is used to visualize the relationship between multiple variables in a dataset.
It uses a grid of subplots, where each subplot shows a scatter plot of two variables.
Pair plot is often used to explore the relationship in a dataset.&lt;/p>
&lt;h3 id="rug-plot">Rug Plot&lt;/h3>
&lt;p>Rug plot shows the distribution of a single numeric variable.
A set of vertical lines is plotted for each observation in the dataset, with x-axis representing the variable of interest and the y-axis representing a value of 0 or 1.
The resulting plot allows you to see the density of observations at different values of the variable.
It&amp;rsquo;s called rug-plot because it looks like a carpet or a rug.&lt;/p>
&lt;h3 id="styling">Styling&lt;/h3>
&lt;p>Style and customization can be done using various function and options like you can change the color palette of a plot, adjust the size and font of the axis labels, or add a title to the plot, scale and provide context to the plot, various plotting function and Faceting(split data across multiple subplots).&lt;/p>
&lt;h2 id="categorial-plots">Categorial Plots&lt;/h2>
&lt;h3 id="bar-plot">Bar Plot&lt;/h3>
&lt;p>In Bar Plot bars can represent different categories or groups, and the height of the bar plot can represent a numerical value or count.
In Seaborn the &lt;code>barplot()&lt;/code> function can plot a bar char of the y-axis variable against the x-axis variable.&lt;/p>
&lt;h3 id="count-plot">Count Plot&lt;/h3>
&lt;p>Count Plot shows the number of occurrences of each category in a dataset.
It used to visualize the distribution of categorical data.
The x-axis represents the categories and the y-axis represents the count of data points in each category.&lt;/p>
&lt;h3 id="box-plot">Box Plot&lt;/h3>
&lt;h3 id="violin-plot">Violin Plot&lt;/h3>
&lt;p>Violin Plot is similar to the box plot, but instead of a box it plots the data as kernel density estimate(KDE).
The violin plot shows the probability density of the data at different values.
It has a marker to indicate the median of the data and the width of violin indicates the frequency of the data points.&lt;/p>
&lt;h3 id="strip-plot">Strip Plot&lt;/h3>
&lt;p>It displays the individual data points as dots or points on a single line.
It is used to show the distribution of a single variable and often used in combination with other types of plots to provide additional information.&lt;/p>
&lt;h3 id="swarm-plot">Swarm Plot&lt;/h3>
&lt;h3 id="palettes">Palettes&lt;/h3>
&lt;p>A palette refers to a set of colors that can be used to create visualizations.
&lt;code>sns.color_palette()&lt;/code> function can be used to create custom palettes.
Different palettes can be used to create different types of plots, such as categorical plots, sequential plots, and diverging plots&lt;/p>
&lt;h2 id="matrix-plot">Matrix Plot&lt;/h2>
&lt;h3 id="heat-maps">Heat Maps&lt;/h3>
&lt;p>Heat maps use color to show the density of distribution of the data, where the values are represented by colors.
It is a 2-dimensional representation of data.
The data can be passed as a matrix or a data-frame, with each row and column representing a variable in the data, and the values of the cells representing the measurements or observations.&lt;/p>
&lt;h3 id="cluster-map">Cluster Map&lt;/h3>
&lt;p>Cluster Map group similar data points together and separated dissimilar data points.
In Cluster Map, the rows and columns of the data are rearranged to group of similar data points together and to make patterns in the data more visible.&lt;/p>
&lt;h3 id="pair-grid">Pair Grid&lt;/h3>
&lt;p>Pair Grid allows to plot multiple plots together in a grid format.&lt;/p>
&lt;h3 id="facet-grid">Facet Grid&lt;/h3>
&lt;h3 id="regression-plot">Regression Plot&lt;/h3>
&lt;iframe src="Learn-Seaborn-code.html" width="100%" height="300">&lt;/iframe></description></item></channel></rss>