Home > functions > plotfunc > vb_plot_sphere.m

vb_plot_sphere

PURPOSE ^

SYNOPSIS ^

function vb_plot_sphere(plot_parm)

DESCRIPTION ^

 Plot sphere model with some activity map. 
 2004-06-14 Taku Yoshioka


 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 vb_plot_sphere(plot_parm)
0002 %
0003 % Plot sphere model with some activity map.
0004 % 2004-06-14 Taku Yoshioka
0005 %
0006 %
0007 % Copyright (C) 2011, ATR All Rights Reserved.
0008 % License : New BSD License(see VBMEG_LICENSE.txt)
0009 
0010 V = plot_parm.V; 
0011 F = plot_parm.F; 
0012 
0013 % Plot sphere model
0014 patch('Faces',F,'Vertices',V,'FaceColor',[0.8 0.8 0.8],...
0015       'FaceLighting','phong','EdgeColor',[0.5 0.5 0.5]);
0016 material dull;
0017 hold on;
0018 
0019 % Activity
0020 if ~isempty(plot_parm.J)
0021   J = plot_parm.J;
0022   wmax = plot_parm.wmax*max(abs(J(:)));
0023   wmin = plot_parm.wmin*max(abs(J(:)));
0024   ix = find(abs(J) >= wmin);
0025   if plot_parm.wmode==1
0026     J = abs(J);
0027   end
0028 
0029   % Plot activity
0030   if plot_parm.paint==1
0031     h = scatter3(V(ix,1),V(ix,2),V(ix,3),1,J(ix),'.','filled');
0032     set(h,'MarkerSize',plot_parm.ms);
0033   else  
0034     FF = vb_patch_select2(ix,F,size(V,1));  
0035     patch('Faces',FF,'Vertices',V,'FaceColor','interp',...
0036       'FaceVertexCData',J,'EdgeColor','none',...
0037       'FaceLighting','none');
0038     material dull;
0039   end
0040 
0041   % Color axis
0042   if plot_parm.wmode==1
0043     caxis([0 wmax]);
0044   else
0045     caxis([-wmax wmax]);
0046   end
0047   
0048   if plot_parm.cmap==1
0049     colormap(hot);
0050   else
0051     colormap(jet);
0052   end
0053 end
0054

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005