Changeset 88 for trunk/src/plot_field.m
- Timestamp:
- May 9, 2010, 10:40:18 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/plot_field.m
r85 r88 698 698 % distinguish B/W and color images 699 699 np=size(A);%size of image 700 siz=size(np); 700 siz=numel(np); 701 if siz>3 702 msgbox_uvmat('ERROR','unrecognized scalar type ') 703 return 704 end 705 if siz==3 706 if np(3)==1 707 siz=2;%B W image 708 elseif np(3)==3 709 siz=3;%color image 710 else 711 msgbox_uvmat('ERROR',['unrecognized scalar type: ' num2str(np(3)) ' color components']) 712 return 713 end 714 end 701 715 %set the color map 702 if siz (2)==2 %for black and white images716 if siz==2 %for black and white images 703 717 if ~isfield(PlotParam.Scalar,'AutoScal') 704 718 PlotParam.Scalar.AutoScal=0;%default … … 781 795 end 782 796 end 783 else if siz(2)==3%color images797 else %color images 784 798 axes(haxes) 785 799 B=uint8(A); … … 832 846 test_ima=1; 833 847 %display the colorbar code for B/W images if Poscolorbar not empty 834 if siz (2)==2 & exist('PosColorbar','var')& ~isempty(PosColorbar)848 if siz==2 & exist('PosColorbar','var')& ~isempty(PosColorbar) 835 849 if isempty(hcol)|~ishandle(hcol) 836 850 hcol=colorbar;%create new colorbar
Note: See TracChangeset
for help on using the changeset viewer.