Matplotlib Tutorials

Matplotlib offers a structured learning path for Python data visualization. Our tutorials cover various plot types, customization options, and best practices, suitable for both beginner 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 immediate graphical results.

Customizing Matplotlib Visualizations

Customizing Matplotlib Visualizations

This lab will guide you through the process of customizing Matplotlib using style sheets and rcParams. Matplotlib is a powerful library for creating visualizations in Python. By customizing the properties and default styles of Matplotlib, you can create unique and visually appealing plots.
MatplotlibPython
Matplotlib Pyplot Interface Tutorial

Matplotlib Pyplot Interface Tutorial

This tutorial provides a step-by-step guide to using the pyplot interface in Matplotlib. The pyplot module is a collection of functions that make Matplotlib work like MATLAB, allowing you to easily create and customize plots. This tutorial assumes you have a basic understanding of Matplotlib and its concepts.
MatplotlibPython
Simple Axis Pad

Simple Axis Pad

This lab will teach you how to use the add_floating_axis function in Matplotlib to add floating axes to a plot, which can be used to display additional information about the plot. Specifically, you will learn how to adjust the padding of tick labels and axis labels, as well as how to adjust the position of ticks on the floating axes.
PythonMatplotlib
The Lifecycle of a Plot

The Lifecycle of a Plot

In this lab, we will explore the lifecycle of a plot using Matplotlib. We will start with raw data and end by saving a customized visualization. We will learn how to create a plot, control its style, customize its appearance, combine multiple visualizations, and save the plot to disk.
PythonMatplotlib
Image Plotting with Matplotlib

Image Plotting with Matplotlib

In this lab, you will learn how to plot and manipulate images using the Matplotlib library in Python. You will learn how to import image data into NumPy arrays, plot numpy arrays as images, apply pseudocolor schemes, add color scale references, examine specific data ranges, and explore different interpolation schemes.
MatplotlibPython
Create a Line Plot with Matplotlib

Create a Line Plot with Matplotlib

In this lab, we will learn how to create a line plot using Matplotlib. Line plots are a basic visualization that can be used to represent data points connected by straight line segments. We will use the Matplotlib library in Python to create a line plot.
PythonMatplotlib
Plotting Categorical Data with Matplotlib

Plotting Categorical Data with Matplotlib

Matplotlib is a popular data visualization library in Python. It provides a variety of customizable plots and graphs for data exploration and presentation. In this lab, we will learn how to plot categorical variables using Matplotlib.
MatplotlibPython
Plotting Coherence of Two Signals

Plotting Coherence of Two Signals

This lab demonstrates how to plot the coherence of two signals using Python's Matplotlib library. The coherence of two signals is a measure of their linear relationship, with a value of 1 indicating perfect coherence and a value of 0 indicating no coherence.
PythonMatplotlib
Creating a Color Demo Chart

Creating a Color Demo Chart

In this lab, we will learn how to create a color demo chart using Python's Matplotlib library. Matplotlib provides a variety of ways to specify colors, which can be used in charts, graphs, and other visualizations. We will explore these different ways of specifying colors and use them to create a chart showing voltage vs. time.
PythonMatplotlib
Matplotlib Colormap Normalization

Matplotlib Colormap Normalization

In data visualization, colormaps are used to represent numerical data through color. However, sometimes the data distribution may be nonlinear, which can make it difficult to discern the details of the data. In such cases, colormap normalization can be used to map colormaps onto data in nonlinear ways to help visualize the data more accurately. Matplotlib provides several normalization methods, including SymLogNorm and AsinhNorm, which can be used to normalize colormaps. This lab will demonstrate how to use SymLogNorm and AsinhNorm to map colormaps onto nonlinear data.
PythonMatplotlib
Creating Colorbars with Matplotlib

Creating Colorbars with Matplotlib

In this tutorial, we will learn how to use the matplotlib library to create colorbars for visualizations. Colorbars are a useful tool to help interpret visualizations, by providing a color scale that corresponds to the data being plotted. We will use matplotlib to create colorbars for visualizations with both positive and negative data values.
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
Matplotlib Visualization with Collections

Matplotlib Visualization with Collections

This tutorial will guide you through creating a visualization using Matplotlib collection. The tutorial will show you how to use LineCollection, PolyCollection, and RegularPolyCollection. The tutorial will also show you how to use the offsets and offset_transform keyword arguments of the LineCollection and PolyCollection to set the positions of the spirals. The tutorial will also show you how to use the RegularPolyCollection to make regular polygons.
PythonMatplotlib
Creating a Plot with Matplotlib

Creating a Plot with Matplotlib

This lab will guide you through creating a plot with Python Matplotlib. Matplotlib is a plotting library for the Python programming language. In this lab, you will learn how to customize a plot's properties including colors, line widths, and more.
PythonMatplotlib
Centeringels Between Ticks

Centeringels Between Ticks

In this lab, we will learn how to center labels between ticks in a Matplotlib plot using Python. By default, tick labels are aligned relative to their associated tick, but there is no direct way to center the labels between ticks. However, we can place a label on the minor ticks in between the major ticks and hide the major tick labels and minor ticks to fake this behavior. We will use financial data for Google's stock price to demonstrate this technique.
PythonMatplotlib
Interactive Colormap Adjustment

Interactive Colormap Adjustment

In this lab, you will learn how to use Matplotlib to interactively adjust the range of colormapping on an image using a colorbar. You will use the zoom and pan mode to adjust the vmin and vmax of the norm. Zooming using the right mouse button will expand the vmin and vmax proportionally to the selected region. When panning, the vmin and vmax of the norm are both shifted according to the direction of movement. You can also use the Home/Back/Forward buttons to get back to a previous state.
PythonMatplotlib
Creating Color Maps

Creating Color Maps

In this lab, you will learn how to create color maps using Matplotlib. Color maps are useful when visualizing data, as they provide a way to represent numerical data through colors. Matplotlib provides a variety of built-in color maps, as well as the ability to create custom color maps.
MatplotlibPython
Connecting Matplotlib Figure Events

Connecting Matplotlib Figure Events

Matplotlib is a popular data visualization library in Python. In this tutorial, you will learn how to connect events that occur when a figure closes. This is useful when you want to perform an action after closing a figure.
MatplotlibPython
  • Prev
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • ...
  • 28
  • Next