MATLAB Examples

This is an example of how to create a 2D scatter plot in MATLAB®.

Read about the scatter function in the MATLAB documentation.

For more examples, go to MATLAB Plot Gallery

% Load undersea elevation data
load seamount x y z

% Create a scatter plot using the scatter function
scatter(x, y, 10, z)

% Add title and axis labels
title('Undersea Elevation')