# Data Visualization with Python

Python provides a myriad of data visualization libraries that give you the flexibility to define every aspect of your visualization. It provides you the option of choosing between static images, which can be helpful for academic papers, and interactive visualizations that can help you delve deeper into your data.

## Data Visualization with Python using Seaborn

• Seaborn Regression Plots with regplot and lmplot
In this tutorial, you’ll learn how to use Seaborn to plot regression plots using the sns.regplot() and sns.lmplot() functions. It may seem confusing that Seaborn would offer two functions to plot regressive relationships. Don’t worry – this guide will simplify all you need to know. By the end of this tutorial, you’ll have learned the … Read more
• Seaborn residplot – Plotting Residuals of Linear Regression
In this tutorial, you’ll learn how to create a residual plot using Seaborn by using the sns.residplot() function. Residual plots let you evaluate the residuals of a regression fit by easily understanding their differences. By the end of this tutorial, you’ll have learned the following: What is a Residual Plot? A residual plot is used … Read more
• Seaborn jointplot() – Creating Joint Plots in Seaborn
In this tutorial, you’ll learn how to use the Seaborn jointplot() function to create informative joint plots. Joint plots allow you to create helpful visuals that plot both a bivariate distribution (such as a scatter plot), as well as the distribution of each of the individual variables. By the end of this tutorial, you’ll have … Read more
• Seaborn displot – Distribution Plots in Python
In this tutorial, you’ll learn how to create Seaborn distribution plots using the sns.displot() function. Distribution plots show how a variable (or multiple variables) is distributed. Seaborn provides many different distribution data visualization functions that include creating histograms or kernel density estimates. Seaborn provides dedicated functions for both of these visualizations. So, why would you … Read more
• Seaborn ecdfplot – Empirical Cumulative Distribution Functions
In this guide, you’ll learn how to use the Seaborn ecdfplot() function to create empirical cumulative distribution functions (ECDF) to visualize the distribution of a dataset. ECDF plots are valuable tools to visualize how datasets are distributed, allowing you to gain strong insight into your data. In this tutorial, you’ll learn about the different parameters … Read more
• Seaborn rugplot – Plotting Marginal Distributions
In this guide, you’ll learn how to use the Seaborn rugfplot() function to plot distributions in the margins to visualize the distribution of a dataset. Rug plots are valuable tools to visualize how datasets are distributed, allowing you to gain strong insight into your data. In this tutorial, you’ll learn about the different parameters and … Read more
• Seaborn kdeplot – Creating Kernel Density Estimate Plots
In this guide, you’ll learn how to use the Seaborn histplot() function to create histograms to visualize the distribution of a dataset. Histograms are valuable tools to visualize how datasets are distributed, allowing you to gain strong insight into your data. In this tutorial, you’ll learn about the different parameters and options of the Seaborn … Read more
• Seaborn histplot – Creating Histograms in Seaborn
In this guide, you’ll learn how to use the Seaborn histplot() function to create histograms to visualize the distribution of a dataset. Histograms are valuable tools to visualize how datasets are distributed, allowing you to gain strong insight into your data. In this tutorial, you’ll learn about the different parameters and options of the Seaborn … Read more
• Seaborn catplot – Categorical Data Visualizations in Python
In this tutorial, you’ll learn how to create Seaborn relational plots using the sns.catplot() function. Categorical plots show the relationship between a numerical and one or more categorical variables. Seaborn provides many different categorical data visualization functions that cover an entire breadth of categorical scatterplots, categorical distribution plots, and categorical estimate plots. Seaborn provides dedicated … Read more
• Seaborn Pointplot: Central Tendency for Categorical Data
In this tutorial, you’ll learn how to use the Seaborn pointplot function to create point plots. Point plots provide similar functions as bar plots, but provide more information, such as error bars around a measure of central tendency. That may sound like a lot to take in – don’t worry, this tutorial will make understanding … Read more
• Seaborn stripplot: Jitter Plots for Distributions of Categorical Data
The Seaborn stripplot function allows you to create data visualizations that easily and effectively show the numeric distribution of data over categories. There aren’t many functions that allow you to do this: the boxplot and violin plots are two of these functions, but they can be intimidating to non-technical audiences. This is where the strip … Read more
• Seaborn Countplot – Counting Categorical Data in Python
In this guide, you’ll learn how to use the Seaborn countplot() function to create informative count plots. A count plot is similar to a bar plot and a histogram and provides counts of categorical values. Seaborn provides a simple and intuitive function to create informative count plots that are simple to produce and easy to … Read more
• Seaborn swarmplot: Bee Swarm Plots for Distributions of Categorical Data
The Seaborn swarmplot function allows you to create data visualizations that easily and effectively show the numeric distribution of data over categories. There are many functions that allow you to do this: the boxplot and violin plots are two of these functions, but they can be intimidating to non-technical audiences. This is where the swarm … Read more
• Seaborn Violin Plots in Python: Complete Guide
In this tutorial, you’ll learn how to create Seaborn violin plots using the sns.violinplot() function. A violin plot is similar to a box and whisker plot in that it shows a visual representation of the distribution of the data. However, the violin plot opens much more data by displaying the data distribution. Violin plots are … Read more
• Customize Seaborn Legends Location, Labels, Text, etc.
Seaborn is a Python library that allows you to make statistical visualizations. Under the hood, it uses Matplotlib and has significant integration with the Pandas data analysis library. The legend in Seaborn is a box that provides descriptions of the different attributes of the graph, including which colors represent which attributes. In this tutorial, you’ll learn … Read more
• Seaborn heatmap: A Complete Guide
Heatmaps are valuable tools to quickly visualize large amounts of data across a scale. In this tutorial, you’ll learn how to use Seaborn to create beautiful and informative heatmaps using the sns.heatmap() function. Seaborn makes it incredibly easy and intuitive to create heatmaps, allowing you to customize them with a familiar function. By the end … Read more
• Creating Multi-Plot Grids in Seaborn with FacetGrid
Seaborn is a data visualization library that lets you build complex statistical visualizations in a simple way. One of the great things is the ability to easily add subplots in Seaborn. In this tutorial, you’ll learn how to create multi-plot grids using the Seaborn FacetGrid and subplots. Because Seaborn is intended to make complex things … Read more
• Seaborn despine: How to Work With and Remove Spines
Seaborn spines are the borders around a plot that help frame the data visualization. Seaborn makes it simple to customize and remove the spines of a visualization using the sns.despine() function. In this tutorial, you’ll learn how to use the Seaborn despine function to customize and remove spines from a visualization. By the end of … Read more
• Seaborn Titles and Axis Labels: Add and Customize
In this tutorial, you’ll learn how to add titles and axis labels to Seaborn plots. Seaborn is built on top of Matplotlib, which allows you to add and customize titles in significant detail. Similarly, Seaborn makes adding and customizing titles or axis labels simple and intuitive. Are you looking to do this in Matplotlib instead? … Read more
• How to Install Seaborn in Python (Fix: no module named seaborn)
In this tutorial, you’ll learn how to install the Seaborn library using Python. You’ll also learn how to fix the no module named seaborn error. The Seaborn library builds on top of Matplotlib to make statistical visualization simple and intuitive to create. By the end of this tutorial, you’ll have learned the following: Want to … Read more
• Seaborn relplot – Creating Scatterplots and Lineplots
In this tutorial, you’ll learn how to create Seaborn relational plots using the sns.relplot() function. Relational plots show the relationship between two or more variables. For example, you might want to use Seaborn to create line plots to show the relationship between continuous variables. Similarly, you may want to create scatter plots. Seaborn provides dedicated … Read more
• Seaborn Scatter Plots in Python: Complete Guide
In this complete guide to using Seaborn to create scatter plots in Python, you’ll learn all you need to know to create scatterplots in Seaborn! Scatterplots are an essential type of data visualization for exploring your data. Being able to effectively create and customize scatter plots in Python will make your data analysis workflow much … Read more
• Creating Pair Plots in Seaborn with sns pairplot
In this tutorial, you’ll learn how to create pair plots in Seaborn, using the sns.pairplot() function. These visualizations plot pairwise relationships in a dataset so that each variable in a dataset will be plotted against each other variable in the dataset. This allows you to easily visualize the relationships between pairs of variables. Seaborn is … Read more
• Seaborn Boxplot – How to Create Box and Whisker Plots
Learn how to create a Seaborn boxplot, including how to add styles, titles, axis labels and add grouped boxplots.
• Seaborn lineplot – Create Line Plots with Seaborn
Learn how to use the Seaborn line plot andrelplot functions to create beautiful line charts, add titles, customize styles, multiple line charts.
• Seaborn barplot() – Create Bar Charts with sns.barplot()
Learn how to use the Seaborn barplot and countplot functions to create beautiful bar charts, add titles, customize styles, group bar charts.
• Seaborn in Python for Data Visualization
In this tutorial, you’ll learn how to create a wide variety of different plots using Seaborn, as well as how to apply different styling options to these plots.

## Data Visualization with Python using Matplotlib

• Retina Mode in Matplotlib: Enhancing Plot Quality
Matplotlib is the defacto data visualization library in Python. It provides a ton of options to create beautiful plots and graphs, but many of these amazing features are hidden away in complex documentation. In this tutorial, you’ll learn how to use the retina mode feature, which allows you to enhance the quality of your plots for higher-resolution displays (or printing). The Quick Answer: How to Use Retina Mode Understanding the Need for Retina Mode in Matplotlib Matplotlib makes it simple to create graphs in Python, using highly customizable syntax. By default, Matplotlib graphs have a resolution of 100.0 DPI. This … Read more
• How to Plot a Function in Python with Matplotlib
Welcome to this comprehensive tutorial on data visualization using Matplotlib and Seaborn in Python. By working through this tutorial, you will learn to plot functions using Python, customize plot appearance, and export your plots for sharing with others. Throughout this tutorial, you’ll gain an in-depth understanding of Matplotlib, the cornerstone library for generating a wide array of customizable plots to visualize data effectively. As you become familiar with the basics, we’ll progress to Seaborn. This library builds on Matplotlib’s features and brings clear advantages in terms of visual aesthetics and ease of use. Here’s a sneak peek of what you’ll … Read more
• How to Create 3D Scatterplots in Matplotlib
In this tutorial, you’ll learn how to make 3D scatterplots using Matplotlib. Being able to visualize data in three dimensions can be an important step in clearly articulating data, especially in science and machine learning. By the end of this tutorial, you’ll have learned: How to plots 3D scatterplots using Matplotlib How to change size, opacity, and color of data points in three dimensions How to add titles and axis labels to your 3D scatterplot in Matplotlib Creating a 3D Scatterplot in Matplotlib In order to create 3D scatterplots in Matplotlib we can import some additional helper modules from Matplotlib. … Read more
• How to Change Font Size in Matplotlib Plot
In this tutorial, you’ll learn how to change font sizes on a Matplotlib plot. You’ll learn everything you need to know to customize your Matplotlib plot to have exactly the font sizes you want. Data visualization is an incredible tool to better communicate your data. Being able to style your plot in the way you want is an important part of that. By the end of this tutorial, you’ll have learned: How to change font sizes globally in Matplotlib How to change font sizes of titles, axis labels, and tick labels Change font sizes using rc parameters Resetting font sizes … Read more
• Set Marker Size in Matplotlib Scatterplots
In this tutorial, you’ll learn how to define and set the marker size in Matplotlib scatterplots. Being able to control the size of your Matplotlib scatterplots allows you to add extra information to your scatterplots. This allows you to communicate more details about your data and make it clearer to your visualization’s readers. Matplotlib allows you to customize the size for all plots as well as for individual plots, based on other data criteria. By the end of this tutorial, you’ll have learned: How to set the marker size for all points in a Matplotlib scatterplot How to set the … Read more
• How to Change Plot and Figure Size in Matplotlib
In this tutorial, you’ll learn how to change the plot and figure sizes in Matplotlib. Data visualization is a valuable tool to help you communicate your data. Being able to customize exactly how your plots are sized gives you the flexibility to produce your desired results. This allows you to produce print-ready visualizations. By the end of this tutorial, you’ll have learned: How to change the plot and figure size using measurements in inches How to set the DPI of a plot and figure How to change the size of a plot by a factor of its size Loading a … Read more
• How to Add Titles to Matplotlib: Title, Subtitle, Axis Titles
In this tutorial, you’ll learn how to add titles to your Matplotlib plots. You’ll learn how to add a title, a subtitle, and axis labels to your plot and subplots. You’ll learn how to style these titles individually and to multiple plots at once. Being able to add titles gives you the ability to better communicate what your data is saying. Matplotlib gives you incredible flexibility to better customize and tweak every element of your plots titles. By the end of this tutorial, you’ll have learned: How to add titles, subtitles, and axis titles to your plot How to style … Read more
• Pandas Scatter Plot: How to Make a Scatter Plot in Pandas
In this tutorial, you’ll learn how to use Pandas to make a scatter plot. Under the hood, Pandas uses Matplotlib, which can make customizing your plot a familiar experience. Pandas allows you to customize your scatter plot by changing colors, adding titles, and more. In more recent versions, Pandas included the ability to use different backends for plotting data. In this tutorial, we’ll explore the default of Matplotlib, though most of the tutorial can extend to different backends. Being able to visualize your data easily is an important step in determining where to take your analysis. In many cases, looking … Read more
• Plotting in Python with Matplotlib
In this tutorial, you’ll learn how to get started with plotting in Python with the matplotlib library. You’ll learn how the matplotlib library works and gain an understanding of its “anatomy”. You’ll learn how to plot and customize some simple graphs and how to use the matplotlib library with Pandas. Finally, you’ll learn how to plot and discover different plot types. Making graphs, or plots, is an incredibly important skill in your data science journey. There’s a reason people say that a picture is worth a thousand words. Whether you’re using plotting as part of your exploratory data analysis or … Read more
• Matplotlib Scatter Charts – Learn all you need to know
Learn how to create Matplotlib scatter charts, including how to customize colours, add titles, change transparency and size of markers.
• Matplotlib Bar Charts – Learn all you need to know
Learn how to create Matplotlib bar charts, including how to customize bar colours, add titles, stacked and double bar charts.
• Matplotlib Line Charts – Learn all you need to know
Learn how to make Matplotlib line charts, including how to add multiple lines, customize labels, add data labels, and add a legend.
• Plotting a Histogram in Python with Matplotlib and Pandas
Learn what histograms are and how to create them in Python with Matplotlib and Pandas.