Skip to main content

Plots for MATLABs

MATLAB plots are visualisations made with functions such as plot, scatter, bar, histogram and surf. A figure contains axes, and you control titles, labels, legends, line styles and colours through function arguments or properties, then export the figure as an image for reports.

Stage: Data and Visualisation · Part of the MATLAB roadmap · Last reviewed 19 November 2026

What to learn in Plots

Plots interview questions

How do you add multiple lines to the same plot?

Call hold on after the first plot so new plots draw on the same axes, or pass several x and y pairs to a single plot call. Add a legend with the legend function, and call hold off when finished.

What does subplot or tiledlayout do?

Both arrange several axes in a grid inside one figure. subplot is the older function that takes rows, columns and position. tiledlayout is newer and manages spacing and shared titles better. Use either to compare related plots side by side.

Where Plots fits in the MATLAB roadmap

Plots belongs to the Data and Visualisation stage (beginner level). Analyse and plot.

Back to the full MATLAB roadmap