No License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

4.5 | 2 ratings Rate this file 17 Downloads (last 30 days) File Size: 1.6 KB File ID: #10481 Version: 1.0




22 Mar 2006 (Updated )

Plot colored lines and points in 3-D space

| Watch this File

File Information

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.

MATLAB release MATLAB 7.0.4 (R14SP2)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
24 Jun 2010 Christian

Hey! Got a problem.
I have created a [X,Y,Z]=meshgrid(x,y,z) for my computed data corresponding to the x,y,z. lets say we have c(x,y,z)=data in a loop.
No i wanna distinguish the data field into a stable data and unstable data. So I want to plot in one plot the data points with a value of less or equal 1. I thought about setting it NaN case 1 and the other way round. But got an error msg.

Help is very welcome.

Greetz Chris

Comment only
13 Oct 2008 WaiChing Sun

very easy to use and understand. Thanks.

05 Apr 2006 liya yu

code is easy to be understand.
some useful commands

Contact us