Index: trunk/src/plot_field.m
===================================================================
--- trunk/src/plot_field.m	(revision 388)
+++ trunk/src/plot_field.m	(revision 389)
@@ -156,5 +156,5 @@
         set(htext,'String',{''})
     else
-        [errormsg]=plot_text(Data,CellVarIndex(index_0D),htext);
+        [errormsg]=plot_text(Data,CellVarIndex(index_0D),VarType(index_0D),htext);
     end
     haxes=[];
@@ -244,5 +244,5 @@
             set(htext,'String',{''})
         else
-            [errormsg]=plot_text(Data,CellVarIndex(index_0D),htext);
+            [errormsg]=plot_text(Data,CellVarIndex(index_0D),VarType(index_0D),htext);
         end
     end
@@ -276,5 +276,5 @@
 
 %-------------------------------------------------------------------
-function errormsg=plot_text(FieldData,CellVarIndex,htext)
+function errormsg=plot_text(FieldData,CellVarIndex,VarTypeCell,htext)
 %-------------------------------------------------------------------
 errormsg=[];
@@ -283,11 +283,20 @@
     VarIndex=CellVarIndex{icell};%  indices of the selected variables in the list data.ListVarName
     for ivar=1:length(VarIndex)
-         VarName=FieldData.ListVarName{VarIndex(ivar)};
-         VarValue=FieldData.(VarName);
-         if size(VarValue,1)~=1
-             VarValue=VarValue';
-         end
-         txt=[VarName '=' num2str(VarValue)];
-         txt_cell=[txt_cell;{txt}];
+        checkancillary=0;
+        if length(FieldData.VarAttribute)>=VarIndex(ivar)
+            VarAttribute=FieldData.VarAttribute{VarIndex(ivar)};
+            if isfield(VarAttribute,'Role')&&strcmp(VarAttribute.Role,'ancillary')
+                checkancillary=1;
+            end
+        end
+        if ~checkancillary% does not display variables with attribute '.Role=ancillary'
+            VarName=FieldData.ListVarName{VarIndex(ivar)};
+            VarValue=FieldData.(VarName);
+            if size(VarValue,1)~=1
+                VarValue=VarValue';
+            end
+            txt=[VarName '=' num2str(VarValue)];
+            txt_cell=[txt_cell;{txt}];
+        end
     end
 end
@@ -1178,5 +1187,4 @@
 siz2=1;
 while siz2<2
-%     values=[-9:div:9];
     values=-10:div:10;
     ind=find((ord*values-MaxA)<0 & (ord*values-MinA)>0);%indices of 'values' such that MinA<ord*values<MaxA
@@ -1187,5 +1195,4 @@
     end
     siz2=size(ind,2);
-%     siz2=siz(2)
     div=div/10;
 end
@@ -1193,10 +1200,8 @@
 end
 
-%'proj_grid': project  fields with unstructured coordinantes on a regular grid
 % -------------------------------------------------------------------------
-% function [A,rangx,rangy]=proj_grid(vec_X,vec_Y,vec_A,rgx_in,rgy_in,npxy_in)
-
-
+% --- 'proj_grid': project  fields with unstructured coordinantes on a regular grid
 function [A,rangx,rangy]=proj_grid(vec_X,vec_Y,vec_A,rgx_in,rgy_in,npxy_in)
+% -------------------------------------------------------------------------
 if length(vec_Y)<2
     msgbox_uvmat('ERROR','less than 2 points in proj_grid.m');
@@ -1212,5 +1217,4 @@
         rangx=rgx_in; % first and last positions
         rangy=rgy_in;
-%             npxy=npxy_in;
         dxy(1)=1/(npxy_in(1)-1);%grid mesh in y
         dxy(2)=1/(npxy_in(2)-1);%grid mesh in x
@@ -1227,5 +1231,4 @@
     xi=[rangx(1):dxy(2):rangx(2)];
     yi=[rangy(1):dxy(1):rangy(2)];
-    [XI,YI]=meshgrid(xi,yi);% creates the matrix of regular coordinates
     A=griddata_uvmat(vec_X,vec_Y,vec_A,xi,yi'); 
     A=reshape(A,length(yi),length(xi));
@@ -1235,5 +1238,4 @@
     ymax=vec_Y(indexend+1);% y coordinate AFTER line change
     ymin=vec_Y(index(1));
-    %y=[vec_Y(index) ymax]; % the set of y ordinates including the last one
     y=vec_Y(index);
     y(length(y)+1)=ymax;
@@ -1252,5 +1254,4 @@
     else        
         rangx=[vec_X(1) vec_X(nx)];% first and last position found for x
-%             rangy=[ymin ymax];
           rangy=[max(ymax,ymin) min(ymax,ymin)];
         if max(nx,ny) <= 64 & isequal(npxy_in,'np>256')
@@ -1272,6 +1273,4 @@
     else %no interpolation for a resolution higher than 256
         A=B;
-        XI=X;
-        YI=Y;
-    end
-end
+    end
+end
