Home > BauerLab > MATLAB > lib > +mouse > +plot > getPhaseColor.m

getPhaseColor

PURPOSE ^

GETPHASECOLOR Summary of this function goes here

SYNOPSIS ^

function [ mcol ] = getPhaseColor( varargin )

DESCRIPTION ^

GETPHASECOLOR Summary of this function goes here
   Detailed explanation goes here

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [ mcol ] = getPhaseColor( varargin )
0002 %GETPHASECOLOR Summary of this function goes here
0003 %   Detailed explanation goes here
0004 
0005 bin_num = 18;
0006 if nargin > 0
0007     bin_num = varargin{1};
0008 end
0009 % Original
0010 % mcol = distinguishable_colors(dStep);
0011 % mcol = [0.*flipud([1:-1/dStep:1/dStep]'),1.*([1:-1/dStep:1/dStep]'),.9.*flipud([1:-1/dStep:1/dStep]')];
0012 % mcol = [mcol(15:end,:);mcol(1:14,:)]
0013 
0014 dStep_half = bin_num/2;
0015 % Green and Blue
0016 % col_leftEnd = [3 192 20 ]./255;
0017 % col_rightEnd = [50  120 223]./255;
0018 
0019 % Red and Blue
0020 col_leftEnd = [255 0 0 ]./255;
0021 col_rightEnd = [0  0 225]./255;
0022 
0023 col_step = ((col_rightEnd - col_leftEnd)'*flipud([1:-1/dStep_half:1/dStep_half]))';
0024 for i = 1:3
0025     mcol(:,i) = col_leftEnd(1,i).*ones(dStep_half,1) + col_step(:,i);
0026 end
0027 
0028 mcol = [mcol; flipud(mcol)];
0029 
0030 % % Rainbow Color
0031 mcol = hsv(18);
0032 mcol = [mcol(9:18,:); mcol(1:8,:)];
0033 end
0034

Generated on Fri 28-Dec-2018 21:42:50 by m2html © 2005