Matplotlib Tutorials

Matplotlib provides a structured learning path for data visualization in Python. Our tutorials cover various plot types, customization options, and best practices, suitable for beginners and intermediate data scientists. With free labs and practical examples, you'll gain hands-on experience in creating informative and attractive visualizations. Our data visualization playground allows you to experiment with Matplotlib functions and see instant graphical results.

Overlay Image on Matplotlib Plot

Overlay Image on Matplotlib Plot

This tutorial will show you how to overlay an image on a Matplotlib plot by moving it to the front and making it semi-transparent. The tutorial uses the figimage method from the matplotlib.figure.Figure class and the imread method from the matplotlib.image module.
PythonMatplotlib
3D Voxel Plotting with Matplotlib

3D Voxel Plotting with Matplotlib

This lab will guide you through the process of creating a 3D voxel plot using the Matplotlib library in Python. Voxel plots are useful for visualizing 3D data in a way that is both clear and aesthetically pleasing. In this lab, we will be using the Axes3D.voxels function to create a voxel plot of two cubes and a link between them.
PythonMatplotlib
Matplotlib Plot Title Positioning

Matplotlib Plot Title Positioning

In this lab, you will learn how to position the titles of plots in Matplotlib. Matplotlib can display plot titles centered, flush with the left side of a set of axes, and flush with the right side of a set of axes. This lab will show you how to use Matplotlib to position plot titles in different ways.
MatplotlibPython
Moving X-Axis Tickels to the Top

Moving X-Axis Tickels to the Top

In this tutorial, we will learn how to move the x-axis tick labels to the top of the plot using Python's Matplotlib library. This can be useful when the x-axis labels are too long and interfere with the plot's readability.
MatplotlibPython
Create Real-Time Oscilloscope with Matplotlib

Create Real-Time Oscilloscope with Matplotlib

This tutorial is a step-by-step guide on how to create an oscilloscope using Python's Matplotlib library. An oscilloscope is a device used to measure and display voltage signals over time. In this tutorial, we will use Matplotlib's animation module to create a real-time display of a voltage signal.
PythonMatplotlib
Ways to Set a Color's Alpha Value

Ways to Set a Color's Alpha Value

This lab is about setting a color's alpha value using the Python Matplotlib library. Alpha value is a measure of transparency, where a value of 0 means completely transparent and a value of 1 means completely opaque. We will explore two ways to set alpha value in Matplotlib: using the alpha keyword argument and using the (matplotlib_color, alpha) color format.
MatplotlibPython
Placing Text Boxes in Matplotlib

Placing Text Boxes in Matplotlib

In data visualization, it is often necessary to add annotations to plots to provide additional information to the audience. One way to do this is by adding text boxes to a plot. In Matplotlib, it is possible to place text boxes in axes coordinates, so the text doesn't move around with changes in x or y limits. You can also use the bbox property of text to surround the text with a ~matplotlib.patches.Patch instance.
PythonMatplotlib
Visualize 2D Arrays with Matplotlib

Visualize 2D Arrays with Matplotlib

Matplotlib is a popular data visualization library in Python. It can be used to create a variety of different types of plots and charts. One of the functions provided by Matplotlib is matshow(), which can be used to visualize a 2D matrix or array as a color-coded image. In this lab, we will go through the steps to use matshow() to visualize a 2D array.
MatplotlibPython
Plotting Lorenz Attractor in 3D using Python

Plotting Lorenz Attractor in 3D using Python

This lab is a step-by-step tutorial for plotting Edward Lorenz's 1963 'Deterministic Nonperiodic Flow' in a 3-dimensional space using mplot3d. We will use Python and Matplotlib, which is a plotting library for the Python programming language.
PythonMatplotlib
Gtk4 Spreadsheet Sgskip

Gtk4 Spreadsheet Sgskip

In this lab, you will learn how to embed Matplotlib in a Gtk4 application and interact with a treeview to store data. You will be able to plot data by double-clicking on an entry in the treeview.
PythonMatplotlib
Drawing Ellipses with Python Matplotlib

Drawing Ellipses with Python Matplotlib

This lab demonstrates how to use Python Matplotlib to draw ellipses. The lab covers two examples:
PythonMatplotlib
Demo Tight Layout

Demo Tight Layout

This lab is designed to provide a step-by-step guide for using Matplotlib, a Python library for creating visualizations. Matplotlib is a popular data visualization tool in the scientific and engineering communities. This tutorial will walk you through the process of creating visualizations using Matplotlib.
MatplotlibPython
Formatting Currency Plots with Matplotlib

Formatting Currency Plots with Matplotlib

In this lab, we will learn how to use Matplotlib to format the y-axis labels of a plot to display dollar signs. This is particularly useful when working with financial data or any data that requires currency formatting.
PythonMatplotlib
Customizing Text Paths with Matplotlib

Customizing Text Paths with Matplotlib

The Matplotlib TextPath is a module that enables the creation of a path that outlines the characters of a text. The resulting path can be used for several purposes, such as a clip path for an image. In this lab, you will learn how to use the TextPath module to create and customize text paths for images.
PythonLinuxMatplotlib
Compute Cross Spectral Density in Python

Compute Cross Spectral Density in Python

In signal processing, Cross Spectral Density (CSD) is a measure of the correlation between two signals in the frequency domain. It is used to determine how much two signals are related to each other in terms of their frequency content. In this lab, you will learn how to compute the CSD of two signals using Python's Matplotlib library.
PythonMatplotlib
Plotting Confidence Ellipses with Matplotlib

Plotting Confidence Ellipses with Matplotlib

This lab will demonstrate how to plot confidence ellipses of a two-dimensional dataset using Python Matplotlib. A confidence ellipse is a graphical representation of the covariance of a dataset, showing the uncertainty of the estimated mean and standard deviation. The ellipses are plotted using the Pearson correlation coefficient.
PythonMatplotlib
Centered Spines with Arrows

Centered Spines with Arrows

Matplotlib is a powerful data visualization tool in Python. In this tutorial, you will learn how to create a plot with centered spines and arrows using Matplotlib.
PythonMatplotlib
Create Broken Horizontal Bar Plots with Matplotlib

Create Broken Horizontal Bar Plots with Matplotlib

Matplotlib is a Python library used for creating static, animated, and interactive visualizations in Python. It is a popular library used for data visualization in Python. In this tutorial, we will learn how to create a broken horizontal bar plot using Matplotlib.
MatplotlibPython
  • Prev
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • ...
  • 28
  • Next