Home > vbmeg > functions > tool_box > dynamics_movie > test_fig > basic_tool > colorbar_plot.m

colorbar_plot

PURPOSE ^

SYNOPSIS ^

function colorbar_plot(C)

DESCRIPTION ^

 2014-11-10 Masa-aki Sato

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function    colorbar_plot(C)
0002 %
0003 % 2014-11-10 Masa-aki Sato
0004 %
0005 % Copyright (C) 2011, ATR All Rights Reserved.
0006 % License : New BSD License(see VBMEG_LICENSE.txt)
0007 
0008 N = size(C,1);
0009 x = (1:N)';
0010 X1 = [x zeros(N,1)];
0011 X2 = [x ones(N,1)];
0012 X  = [X1;X2];
0013 
0014 x = (1:N-1)';
0015 F = [x x+1 x+N; x+N x+N+1 x+1];
0016 
0017 CC = [C; C];
0018 
0019 % plot cylindrical lines
0020 patch('Faces',F,'Vertices',X,'FaceColor','interp',...
0021   'FaceVertexCData',CC,'EdgeColor','none',...
0022   'FaceLighting','none');
0023 
0024 %axis equal

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005