image thumbnail

MATLAB Plot Gallery - Scatter Plot 2D

by

 

24 Feb 2012 (Updated )

Create a 2D scatter plot

Scatter_Plot_2D

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
figure
scatter(x, y, 10, z)

% Add title and axis labels
title('Undersea Elevation')
xlabel('Longitude')
ylabel('Latitude')

Contact us