function p=plot_surf(surfData,colorData,varargin) % figure p=patch(surfData,... 'EdgeColor', 'none', ... 'AmbientStrength', 0.5, ... 'FaceVertexCData', colorData, ... 'FaceColor', 'interp' ... ); set(p,'FaceLighting','gouraud'); for i=1:length(varargin) eval(varargin{i}); end axis('image'); axis off axis equal % view([150 30]); % c=colorbar; % try % t=get(c,'Limits'); % the_lines=(linspace(t(1),t(2),10)*10^round_precision); % if ~(abs(t(1))<1e-4) % the_lines(1)=ceil(the_lines(1)); % end % the_lines(end)=floor(the_lines(end)); % % the_lines(2:end-1)=round(the_lines(2:end-1)); % the_lines=the_lines/10^round_precision; % set(c,'Ticks',the_lines); % % catch % warning('round fail!'); % end colormap('jet') % c=colorbar; % lim=get(c,'Limits') % c.Position=[0.78 0.25 0.035 0.5]; % c.FontSize=11; % if exist('unit_str','var') % title(c,unit_str,'fontsize',13,'fontweight','bold'); % end % user define view point if 0% for Cylinders ax=gca; ax.CameraPositionMode='manual'; ax.CameraPosition = [100 100 100]; ax.CameraTargetMode='manual'; ax.CameraTarget=[0 0 50]; ax.CameraViewAngleMode='manual'; ax.CameraViewAngle = 50; end end