4.0

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

Conditionally Colored Plot (CCPLOT)

by Michael Heidingsfeld

 

03 Aug 2012 (Updated 06 Aug 2012)

Plots conditionally colored (2D line) graphs.

| Watch this File

File Information
Description

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.

Example:
x = linspace(0,4*pi,50);
y = sin(x);
c = y.^2;
map = colormap(jet);
h = ccplot(x,y,c,map);
set(h,'Marker','o');

Acknowledgements

Conditionally Colored Line Plot inspired this file.

This file inspired The Code For Solving Wahba's Problem.

Required Products MATLAB
MATLAB release MATLAB 7.11.1 (R2010bSP1)
Tags for This File  
Everyone's Tags
color, gradient, plot, visualization
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
14 Feb 2013 JR King

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

Updates
06 Aug 2012

* Fixed minor error in example

Contact us