Changeset 1131 for trunk/src/plot_field.m
- Timestamp:
- Apr 11, 2024, 7:30:52 PM (3 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/plot_field.m
r1127 r1131 981 981 else %usual images (no contour) 982 982 % set colormap for image display 983 if strcmp(ColorMap,'grayscale') 984 vec=linspace(0,1,255);%define a linear greyscale colormap 985 map=[vec' vec' vec']; 986 colormap(map); %grey scale color map 987 if siz==3% true color images visualized in BW 988 A=uint16(sum(A,3));%sum the three color components for color images displayed with BW option 989 end 990 elseif strcmp(ColorMap,'BuYlRd') 991 hh=load('BuYlRd.mat'); 992 colormap(hh.BuYlRd); 993 else 994 if siz==3 && CheckFixScalar % true color images rescaled by MaxA 995 A=uint8(255*double(A)/double(MaxA)); 996 end 997 colormap(ColorMap); % standard false colors for div, vort , scalar fields 998 end 983 switch ColorMap 984 case 'grayscale' 985 vec=linspace(0,1,255);%define a linear greyscale colormap 986 map=[vec' vec' vec']; 987 colormap(map); %grey scale color map 988 if siz==3% true color images visualized in BW 989 A=uint16(sum(A,3));%sum the three color components for color images displayed with BW option 990 end 991 case 'BuYlRd' 992 hh=load('BuYlRd.mat'); 993 colormap(hh.BuYlRd); 994 case 'truecolor' 995 if siz==3 && CheckFixScalar % true color images rescaled by MaxA 996 A=uint8(255*double(A)/double(MaxA)); 997 end 998 end 999 999 1000 1000 1001 % interpolate field to increase resolution of image display
Note: See TracChangeset
for help on using the changeset viewer.