0001 function show_polygonsValues(imdl,data,colors,edgeColor,lineStyle)
0002
0003 if nargin<3
0004 colors= 'jet';
0005 edgeColor= 'none';
0006 lineStyle= '-';
0007 elseif nargin<4
0008 edgeColor= 'none';
0009 lineStyle= '-';
0010 elseif nargin<5
0011 edgeColor= 'none';
0012 lineStyle= '-';
0013 end
0014
0015 if isfield(imdl,'inv_solve')
0016 polygonsX= imdl.inv_solve.polygonsX;
0017 polygonsY= imdl.inv_solve.polygonsY;
0018 elseif isfield(imdl,'polygonsX')
0019 polygonsX= imdl.polygonsX;
0020 polygonsY= imdl.polygonsY;
0021 end
0022
0023 if size(data,1)>1
0024 data= data';
0025 end
0026 if size(polygonsX,2)~= size(data,2)
0027 polygonsX= polygonsX';
0028 end
0029 if size(polygonsY,2)~= size(data,2)
0030 polygonsY= polygonsY';
0031 end
0032
0033 fill(polygonsX,polygonsY,data,'EdgeColor',edgeColor,'LineStyle',lineStyle);
0034 hold on;
0035
0036 if ischar(colors)
0037 colormap(colors)
0038 else
0039 set(gcf,'Colormap',colors)
0040 end
0041
0042
0043 end