Python – Data visualization tutorial
Data Visualization is a technique of presenting data graphically or in a pictorial format which helps to understand large quantities of data very easily. This allows decision-makers to make better decisions and also allows identifying new trends, patterns in a more efficient way.
In this tutorial, we will look at different modules provided by Python for data visualization and will learn about these modules from basic to advance with the help of a huge dataset containing information from installation to different types of charts to exercises, applications, and projects.
Matplotlib is an easy-to-use Python library for data visualization which is built on top of NumPy arrays. It is a low-level module and provides a lot of flexibility but at the cost of writing more code.
- Environment Setup for Matplotlib
- Introduction to Matplotlib
- Python Matplotlib – An Overview
- Using Matplotlib with Jupyter Notebook
- Pyplot in Matplotlib
- Matplotlib – Axes Class
- Multiplots in Python using Matplotlib
- How to create multiple subplots in Matplotlib in Python?
- How to Add Title to Subplots in Matplotlib?
- How to Set a Single Main Title for All the Subplots in Matplotlib?
- How to Create Different Subplot Sizes in Matplotlib?
- How to set the spacing between subplots in Matplotlib in Python?
- Line chart in Matplotlib
- Line plot styles in Matplotlib
- Plot Multiple lines in Matplotlib
- Plot line graph from NumPy array
- Bar Plot in Matplotlib
- Create a stacked bar plot in Matplotlib
- Stacked Percentage Bar Plot In MatPlotLib
- Plotting back-to-back bar charts Matplotlib
- Plotting Histogram in Python using Matplotlib
- Create a cumulative histogram in Matplotlib
- How to plot two histograms together in Matplotlib?
- Overlapping Histograms with Matplotlib in Python
- Bin Size in Matplotlib Histogram
- Compute the histogram of a set of data using NumPy in Python
- Plot 2-D Histogram in Python using Matplotlib
- matplotlib.pyplot.scatter() in Python
- How to add a legend to a scatter plot in Matplotlib ?
- How to Connect Scatterplot Points With Line in Matplotlib?
- How to create a Scatter Plot with several colors in Matplotlib?
- How to increase the size of scatter points in Matplotlib ?
- Plot a pie chart in Python using Matplotlib
- How to set border for wedges in Matplotlib pie chart?
- Radially displace pie chart wedge in Matplotlib
- Three-dimensional Plotting in Python using Matplotlib
- 3D Scatter Plotting in Python using Matplotlib
- 3D Surface plotting in Python using Matplotlib
- 3D Wireframe plotting in Python using Matplotlib
- 3D Contour Plotting in Python using Matplotlib
- Tri-Surface Plot in Python using Matplotlib
- Surface plots and Contour plots in Python
- How to change angle of 3D plot in Python?
Working with Images
- Style Plots using Matplotlib
- Change plot size in Matplotlib – Python
- How to Change the Transparency of a Graph Plot in Matplotlib with Python?
- How to Change the Color of a Graph Plot in Matplotlib with Python?
- How to Change Fonts in matplotlib?
- How to Set Plot Background Color in Matplotlib?
- How to add text to Matplotlib?
- How to change Matplotlib color bar size in Python?
More on Matplotlib
- Make a violin plot in Python using Matplotlib
- Errorbar graph in Python using Matplotlib
- Python | Basic Gantt chart using Matplotlib
- Stem and Leaf Plots in Python
- How to draw 2D Heatmap using Matplotlib in python?
- Plotting Correlation Matrix using Python
- Plot Candlestick Chart using mplfinance module in Python
- Autocorrelation plot using Matplotlib
- Place plots side by side in Matplotlib
- Difference Between cla(), clf() and close() Methods in Matplotlib
- Make filled polygons between two horizontal curves in Python using Matplotlib
- How to Save a Plot to a File Using Matplotlib?
- How to Plot Logarithmic Axes in Matplotlib?
- Using Matplotlib for Animations
Seaborn is a high-level library built on the top of Matplotlib which means that it can also use Matplotlib functions and classes. This library provides default styles and color palettes to make a plot more attractive.
- Introduction to Seaborn – Python
- Difference Between Matplotlib VS Seaborn
- Plotting graph using Seaborn
- Relational plots in Seaborn – Part I
- Relational plots in Seaborn – Part II
- Data Visualization with Seaborn Line Plot
- Scatterplot using Seaborn in Python
- Categorical Plots
- Barplot using seaborn in Python
- Count Plot using seaborn in Python
- Boxplot using Seaborn in Python
- Violin plot using Seaborn in Python
- Strip plot using Seaborn in Python
- Swarmplot using Seaborn in Python
- Plotting different types of plots using Factor plot in seaborn
- Python Seaborn – Catplot
- Distribution Plots
- How to Make Histograms with Density Plots with Seaborn histplot?
- Data visualization with Pairplot Seaborn and Pandas
- Seaborn Kdeplot – A Comprehensive Guide
- Regression Plots
- Matrix plots in Seaborn
- Seaborn Heatmap – A comprehensive guide
- Hierarchically-clustered Heatmap in Python with Seaborn Clustermap
- Change Axis Labels, Set Title and Figure Size to Plots with Seaborn
- How to set the title and fonts of your Seaborn Chart?
- How To Place Legend Outside the Plot with Seaborn in Python?
- How to change Seaborn legends font size, location and color?
- How to add center align text in each subplot graph in seaborn?
- How to set a Seaborn chart figure size?
- Rotate axis tick labels in Seaborn and Matplotlib
- How to set axes labels & limits in a Seaborn plot?
- How to change axes limits in Seaborn?
- Seaborn – Color Palette
- Seaborn | Style And Color
After going through these two libraries, you all might be wondering why Plotly. Why we have to learn Plotly over the above visualization tools. Here’s why –
- Plotly has hover tool capabilities that allow us to detect any outliers or anomalies in a large number of data points.
- It is visually attractive that can be accepted by a wide range of audiences.
- It allows us for the endless customization of our graphs that makes our plot more meaningful and understandable for others.
Different Types of Charts
- Line Chart using Plotly in Python
- Bar Chart
- Scatter plot using Plotly in Python
- Bubble chart using Plotly in Python
- Pie plot using Plotly in Python
- Box Plot
- Violin plot using Plotly in Python
- Gantt Chart in Plotly
- Contour Plots using Plotly in Python
- Create Heatmaps using graph_objects class in Plotly
- 3D Plots
- Sunburst Plot using Plotly in Python
- Polar Charts using Plotly in Python
- Ternary Plots in Plotly
- Sankey Diagram using Plotly in Python
- Quiver Plots using Plotly in Python
- Treemap using Plotly in Python
Interacting with the Plots
- How to make Dropdown Menus in Plotly?
- How to make Custom Buttons in Plotly?
- How to make Range Slider and Selector in Plotly?