Plot coloured line(s) in 2 dimensions in the current figure.

h = col_line(x,y,c) % Matlab & Octave
col_line(x,y,c) #R

Plot coloured line(s) in 2 dimensions in the current figure.

Input var Description Default value
x A vector or matrix of points on the horizontal axis. N/A
y A vector or matrix of points on the vertical axis. N/A
c A vector or matrix of values representing the colour to draw at each point. N/A
… (R only) Additional inputs for plot() N/A
• x, y and c must all be the same size.
• If x, y, and c are matrices, one line is drawn for each column.
• The color axis will by default span the range of values in c, i.e., caxis will be c(min(min©), max(max©)). This can be changed by calling caxis after colline.

### Matlab & Octave

T = cumsum(randn(1000,2)) ;
col_line(T(:,1),T(:,2),(1:size(T,1))') ;

### R

col_line(1:20, 1:20, 1:20)

bugs@animaltags.org Last modified: 8 June 2017

• tagwiki/tools/plotting/col_line.txt
• Last modified: 2017/07/24 19:49
• by 153.106.54.148