MATLAB Plot Gallery

The MATLAB plot gallery provides examples of many ways to display data graphically in MATLAB. You can view and download source code for each plot, and use it in your own MATLAB project.

For more options, visit MATLAB Live Script Gallery to run live script examples from the MATLAB Community.

Learn the Basics

Standard Plots

Line Plot 2D (1)

Function Plot (3)

Semilogy Plot

Histogram Plot

Pie Chart 3D

Rose Plot

Stem Plot (2)

Errorbar Plot

Display Image (2)

Surface Plot (2)

Line Plot 2D (2)

Function Plot (4)

Vertical Bar Plot

Bivariate Histogram Plot

Area Plot

Polar Histogram

Stairstep Plot

Two Y Axis Plot (1)

Display Image (3)

Function Surface Plot

Line Plot 2D (3)

Line Plot 3D

Stacked Bar Chart

Categorical Histogram Plot

Contour Plot

Polar Scatter Plot

Graph Plot

Two Y Axis Plot (2)

Quiver Plot 2D

Mesh Plot

Datetime Plot (1)

Function Plot 3D

Horizontal Bar Plot

Heatmap Chart

Function Contour Plot

Scatter Plot 2D

Graph Plot 2

Subplot (1)

Quiver Plot 3D

Function Mesh Plot

Function Plot (1)

Log-Log Plot

Datetime Plot (2)

Pie Chart 2D (1)

Polar Plot

Scatter Plot 3D

Directed Graph Plot

Subplot (2)

Ribbon Plot

Surface Contour Plot

Function Plot (2)

Semilogx Plot

Bar Graph 3D

Pie Chart 2D (2)

Function Polar Plot

Stem Plot (1)

Fill Plot

Display Image (1)

Surface Plot (1)

Triangular Plot

Customizing Plots

Standard Line Colors

Adding Text to Plots (1)

Standard Line Styles

Adding Text to Plots (2)

Standard Plot Markers

Adding Latex to Plots

Using Colorbars (1)

Set Axes Positions

Using Colorbars (2)

Customize Axes Settings

Adding Lines to Plots

Customize Polar Axes Settings

Creating Transparent Objects

Change Color Shading

Change Lighting to Flat

Change Lighting to Gouraud

Advanced Plots

Area Bar Pie Charts with Annotations

Two Waves

Colormap Chart


Curve with Lower and Upper Bounds


Plot in Plot

Publication Quality Graphics