Changeset 8128
- Timestamp:
- 05/04/11 09:52:05 (14 years ago)
- Location:
- issm/trunk/src/m/model
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/model/ismodelselfconsistent.m
r8121 r8128 152 152 end 153 153 if ~ismember(md.rheology_law,[NoneEnum PatersonEnum ArrheniusEnum]), 154 error(['model not consistent: model ' md.name ' hydrostatic_adjustment field should be AbsoluteEnum or IncrementalEnum']);154 error(['model not consistent: model ' md.name ' rheology_law field should be NoneEnum, PatersonEnum or ArrheniusEnum']); 155 155 end 156 156 %}}} -
issm/trunk/src/m/model/plot/applyoptions.m
r8114 r8128 1 function applyoptions(md,data,options ,plothandle)1 function applyoptions(md,data,options) 2 2 %APPLYOPTIONS - apply the options to current plot 3 3 % … … 447 447 %lighting 448 448 if strcmpi(getfieldvalue(options,'light','off'),'on'), 449 set( plothandle,'FaceLighting','gouraud','FaceColor','interp','AmbientStrength',0.5);449 set(gca,'FaceLighting','gouraud','FaceColor','interp','AmbientStrength',0.5); 450 450 light('Position',[0 0.1 0.1],'Style','infinite'); 451 451 end -
issm/trunk/src/m/model/plot/plot_manager.m
r8001 r8128 178 178 179 179 %plot unit 180 h=plot_unit(x,y,z,elements,data2,is2d,datatype,options);180 plot_unit(x,y,z,elements,data2,is2d,datatype,options); 181 181 182 182 … … 189 189 end 190 190 191 applyoptions(md,data2,options ,h);191 applyoptions(md,data2,options); 192 192 193 193 %do ground overlay on kml plot_unit? -
issm/trunk/src/m/model/plot/plot_unit.m
r8001 r8128 1 function h=plot_unit(x,y,z,elements,data,is2d,datatype,options)1 function plot_unit(x,y,z,elements,data,is2d,datatype,options) 2 2 %PLOT_UNIT - unit plot, display data 3 3 % 4 4 % Usage: 5 % h=plot_unit(x,y,z,elements,data,is2d,datatype,options);5 % plot_unit(x,y,z,elements,data,is2d,datatype,options); 6 6 % 7 7 % See also: PLOTMODEL, PLOT_MANAGER … … 17 17 pos=find(~isnan(data)); %needed for element on water 18 18 if is2d, 19 A=elements(pos,1); B=elements(pos,2); C=elements(pos,3); h=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData', data(pos),'FaceColor','flat','EdgeColor',edgecolor);19 A=elements(pos,1); B=elements(pos,2); C=elements(pos,3); patch( 'Faces', [A B C], 'Vertices', [x y z],'CData', data(pos),'FaceColor','flat','EdgeColor',edgecolor); 20 20 else 21 21 A=elements(pos,1); B=elements(pos,2); C=elements(pos,3); D=elements(pos,4); E=elements(pos,5); F=elements(pos,6); 22 h=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData', data(pos),'FaceColor','flat','EdgeColor',edgecolor);22 patch( 'Faces', [A B C], 'Vertices', [x y z],'CData', data(pos),'FaceColor','flat','EdgeColor',edgecolor); 23 23 patch( 'Faces', [D E F], 'Vertices', [x y z],'CData', data(pos),'FaceColor','flat','EdgeColor',edgecolor); 24 24 patch( 'Faces', [A B E D],'Vertices', [x y z],'CData', data(pos),'FaceColor','flat','EdgeColor',edgecolor); … … 32 32 if is2d, 33 33 A=elements(:,1); B=elements(:,2); C=elements(:,3); 34 h=patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', data(:),'FaceColor','interp','EdgeColor',edgecolor);34 patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', data(:),'FaceColor','interp','EdgeColor',edgecolor); 35 35 else 36 36 A=elements(:,1); B=elements(:,2); C=elements(:,3); D=elements(:,4); E=elements(:,5); F=elements(:,6); 37 h=patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', data(:),'FaceColor','interp','EdgeColor',edgecolor);37 patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', data(:),'FaceColor','interp','EdgeColor',edgecolor); 38 38 patch( 'Faces', [D E F], 'Vertices', [x y z],'FaceVertexCData', data(:),'FaceColor','interp','EdgeColor',edgecolor); 39 39 patch( 'Faces', [A B E D],'Vertices', [x y z],'FaceVertexCData', data(:),'FaceColor','interp','EdgeColor',edgecolor); … … 55 55 56 56 if is2d, 57 h=patch( 'Faces',elements,'Vertices',[x y],'CData',data,'FaceColor','interp','EdgeColor',edgecolor);57 patch( 'Faces',elements,'Vertices',[x y],'CData',data,'FaceColor','interp','EdgeColor',edgecolor); 58 58 else 59 59 A=elements(:,1); B=elements(:,2); C=elements(:,3); D=elements(:,4); E=elements(:,5); F=elements(:,6); 60 h=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData', data,'FaceColor','interp','EdgeColor',edgecolor);60 patch( 'Faces', [A B C], 'Vertices', [x y z],'CData', data,'FaceColor','interp','EdgeColor',edgecolor); 61 61 patch( 'Faces', [D E F], 'Vertices', [x y z],'CData', data,'FaceColor','interp','EdgeColor',edgecolor); 62 62 patch( 'Faces', [A B E D], 'Vertices', [x y z],'CData', data,'FaceColor','interp','EdgeColor',edgecolor); … … 70 70 if is2d, 71 71 A=elements(:,1); B=elements(:,2); C=elements(:,3); 72 h=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData', data(:),'FaceColor','flat','EdgeColor',edgecolor);72 patch( 'Faces', [A B C], 'Vertices', [x y z],'CData', data(:),'FaceColor','flat','EdgeColor',edgecolor); 73 73 else 74 74 A=elements(:,1); B=elements(:,2); C=elements(:,3); D=elements(:,4); E=elements(:,5); F=elements(:,6); 75 h=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData', data,'FaceColor','flat','EdgeColor',edgecolor);75 patch( 'Faces', [A B C], 'Vertices', [x y z],'CData', data,'FaceColor','flat','EdgeColor',edgecolor); 76 76 patch( 'Faces', [D E F], 'Vertices', [x y z],'CData', data,'FaceColor','flat','EdgeColor',edgecolor); 77 77 patch( 'Faces', [A B E D],'Vertices', [x y z],'CData', data,'FaceColor','flat','EdgeColor',edgecolor);
Note:
See TracChangeset
for help on using the changeset viewer.