image thumbnail

MATLAB Plot Gallery - Line Plot 3D

by

 

24 Feb 2012 (Updated )

Create a 3D plot

Line_Plot_3D

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

Read about the plot3 function in the MATLAB documentation.

For more examples, go to MATLAB Plot Gallery

% Load the spectra data
load spectraData masscharge time spectra

% Create the 3D plot
figure
plot3(masscharge, time, spectra)
box on

% Set the viewing angle and the axis limits
view(26, 42)
axis([500 900 0 22 0 4e8])

% Add title and axis labels
xlabel('Mass/Charge (M/Z)')
ylabel('Time')
zlabel('Ion Spectra')
title('Extracted Spectra Subset')

Contact us