4.0 | 1 rating Rate this file 21 Downloads (last 30 days) File Size: 1.61 KB File ID: #37725
image thumbnail

Conditionally Colored Plot (CCPLOT)



03 Aug 2012 (Updated )

Plots conditionally colored (2D line) graphs.

| Watch this File

File Information

Plots the vector Y versus vector X using conditional coloring based on colormaps.

The condition vector C is independent of the values of X and Y but must be the same size.

The colormap MAP can either be a Matlab or a userdefined colormap.

x = linspace(0,4*pi,50);
y = sin(x);
c = y.^2;
map = colormap(jet);
h = ccplot(x,y,c,map);


Conditionally Colored Line Plot inspired this file.

Required Products MATLAB
MATLAB release MATLAB 7.11.1 (R2010bSP1)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
14 Feb 2013 JR King

JR King (view profile)

Thanks. It would be nice however to allow multiple line plotting such as: ccplot(1:10,rand(200,10),c,map)

06 Aug 2012

* Fixed minor error in example

Contact us