Plot colored lines and points in 3-D space
Updated 22 Mar 2006

No License

PLOT4 Plot colored lines and points in 3-D space

PLOT3(x,y,z,c), where x, y, z and c are four vectors of the same length N, plots a line in 3-space through the points whose coordinates are the elements of x, y and z, colored according to the values in c. The line consists of N-1 line segments.

Various line types, plot symbols and colors may be obtained with PLOT3(X,Y,Z,s) where s is a 1, 2 or 3 character string made from the characters listed under the PLOT command.

Example: A helix:

t = 0:pi/50:4*pi;

PLOT4 returns a column vector of handles to lineseries objects, one handle per line segment.

See also plot, plot3, line, axis, view, mesh, surf.

Cite As

Christophe Lauwerys (2024). PLOT4 (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R14SP2
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Visual Exploration in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes