Home > functions > plotfunc > vb_plot_fit.m

vb_plot_fit

PURPOSE ^

Plot marker fit

SYNOPSIS ^

function vb_plot_fit(V,F,pos,ddmin,marker,marker2)

DESCRIPTION ^

 Plot marker fit
  vb_plot_fit(V,F,pos,ddmin,marker,marker2)

 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_fit(V,F,pos,ddmin,marker,marker2)
0002 % Plot marker fit
0003 %  vb_plot_fit(V,F,pos,ddmin,marker,marker2)
0004 %
0005 % Copyright (C) 2011, ATR All Rights Reserved.
0006 % License : New BSD License(see VBMEG_LICENSE.txt)
0007 
0008 fwgcolor   = [0.8 0.7 0.6];
0009 edgecolor  = 'none';
0010 
0011 alphaval = 0.8;
0012 msize1     = 10;
0013 mtype1     = '.b';
0014 msize2     = 20;
0015 mtype2     = '.r';
0016 msize3     = 20;
0017 mtype3     = '.b';
0018 NX         = 2;
0019 NY         = 1;
0020 angle     = [120 30];
0021 
0022 %view([180, 0]);    % Front view (from +Y axis)
0023 %view([ 90, 0]);    % Right view (from +X axis)
0024 %view([-90, 0]);    % Left view  (from -X axis)
0025 %view([  0, 90]);    % Top view   (from +Z axis)
0026 
0027 figure;
0028 % view
0029 subplot(NY,NX,1)
0030 vb_plot_surf(V,F,fwgcolor,edgecolor,1);
0031 hold on
0032 view(angle); 
0033 if isempty(ddmin)
0034     plot3(pos(:,1),pos(:,2),pos(:,3),mtype1,'MarkerSize',msize1);
0035     alpha(alphaval);
0036     title('Head fitting point position')
0037 else
0038     scatter3(pos(:,1),pos(:,2),pos(:,3),msize1,ddmin,'filled');
0039     colormap(jet);
0040     title('Color coded distance at fitting points [mm]')
0041     colorbar('horiz')
0042 end
0043 axis equal;
0044 axis tight;
0045 
0046 subplot(NY,NX,2)
0047 vb_plot_surf(V,F,fwgcolor,edgecolor,1);
0048 hold on
0049 view(angle); 
0050 plot3(marker(:,1),marker(:,2),marker(:,3),mtype2,'MarkerSize',msize2);
0051 
0052 if exist('marker2','var')
0053   plot3(marker2(:,1),marker2(:,2),marker2(:,3),mtype3,'MarkerSize',msize3);
0054 end
0055 
0056 title('Sensor/Marker position')
0057 axis equal;
0058 axis tight;
0059 alpha(alphaval);
0060 
0061 return

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