Index: trunk/src/proj_field.m
===================================================================
--- trunk/src/proj_field.m	(revision 569)
+++ trunk/src/proj_field.m	(revision 575)
@@ -28,5 +28,5 @@
 %    .Txt: error message, transmitted to the projection
 %    .FieldList: cell array of strings representing the fields to calculate
-%    .Mesh: typical distance between data points (used for mouse action or display), transmitted
+%    .CoordMesh: typical distance between data points (used for mouse action or display), transmitted
 %    .CoordUnit, .TimeUnit, .dt: transmitted
 % standardised description of fields, nc-formated Matlab structure with fields:
@@ -321,5 +321,5 @@
 ProjData.VarAttribute={};
 
-Mesh=zeros(1,numel(FieldData.ListVarName));
+CoordMesh=zeros(1,numel(FieldData.ListVarName));
 if isfield (FieldData,'VarAttribute')
     %ProjData.VarAttribute=FieldData.VarAttribute;%list of variable attribute names
@@ -329,6 +329,6 @@
             unit{iattr}=FieldData.VarAttribute{iattr}.Unit;
         end
-        if isfield(FieldData.VarAttribute{iattr},'Mesh')
-            Mesh(iattr)=FieldData.VarAttribute{iattr}.Mesh;
+        if isfield(FieldData.VarAttribute{iattr},'CoordMesh')
+            CoordMesh(iattr)=FieldData.VarAttribute{iattr}.CoordMesh;
         end
     end
@@ -462,9 +462,9 @@
         ProjData.([VarName 'Min'])=min(double(FieldData.(VarName)(indsel,:))); % take the min in the selected region , for each color component
         ProjData.([VarName 'Max'])=max(double(FieldData.(VarName)(indsel,:))); % take the max in the selected region , for each color component
-        if isequal(Mesh(ivar),0)
-            eval(['[ProjData.' VarName 'Histo,ProjData.' VarName ']=hist(double(FieldData.' VarName '(indsel,:,:)),100);']); % default histogram with 100 bins
+        if isequal(CoordMesh(ivar),0)
+            [ProjData.([VarName 'Histo']),ProjData.(VarName)]=hist(double(FieldData.(VarName)(indsel,:,:)),100); % default histogram with 100 bins
         else
-            eval(['ProjData.' VarName '=(ProjData.' VarName 'Min+Mesh(ivar)/2:Mesh(ivar):ProjData.' VarName 'Max);']); % list of bin values
-            eval(['ProjData.' VarName 'Histo=hist(double(FieldData.' VarName '(indsel,:)),ProjData.' VarName ');']); % histogram at predefined bin positions
+            ProjData.(VarName)=ProjData.([VarName 'Min'])+CoordMesh(ivar)/2:CoordMesh(ivar):ProjData.([VarName 'Max']); % list of bin values
+            ProjData.([VarName 'Histo'])=hist(double(FieldData.(VarName)(indsel,:)),ProjData.(VarName)); % histogram at predefined bin positions
         end
         ProjData.ListVarName=[ProjData.ListVarName {VarName} {[VarName 'Histo']} {[VarName 'Mean']} {[VarName 'Min']} {[VarName 'Max']}];
@@ -891,11 +891,11 @@
 if isfield(ObjectData,'DX') && ~isempty(ObjectData.DX)
      DX=abs(ObjectData.DX);%mesh of interpolation points 
-% else
-%     DX=FieldData.Mesh;
+else
+     DX=FieldData.CoordMesh;
 end
 if isfield(ObjectData,'DY') && ~isempty(ObjectData.DY)
      DY=abs(ObjectData.DY);%mesh of interpolation points 
-% else
-%     DY=FieldData.Mesh;
+else
+     DY=FieldData.CoordMesh;
 end
 if  ~strcmp(ObjectData.ProjMode,'projection') && (isempty(DX)||isempty(DY))
@@ -962,7 +962,7 @@
 ProjData.VarAttribute={};
 if ~isempty(DX) && ~isempty(DY)
-    ProjData.Mesh=sqrt(DX*DY);%define typical data mesh, useful for mouse selection in plots
-elseif isfield(FieldData,'Mesh')
-    ProjData.Mesh=FieldData.Mesh;
+    ProjData.CoordMesh=sqrt(DX*DY);%define typical data mesh, useful for mouse selection in plots
+elseif isfield(FieldData,'CoordMesh')
+    ProjData.CoordMesh=FieldData.CoordMesh;
 end
 error=0;%default
@@ -1656,7 +1656,7 @@
 ProjData.VarDimName={};
 if ~isequal(DX,0)&& ~isequal(DY,0)
-    ProjData.Mesh=sqrt(DX*DY);%define typical data mesh, useful for mouse selection in plots
-elseif isfield(FieldData,'Mesh')
-    ProjData.Mesh=FieldData.Mesh;
+    ProjData.CoordMesh=sqrt(DX*DY);%define typical data mesh, useful for mouse selection in plots
+elseif isfield(FieldData,'CoordMesh')
+    ProjData.CoordMesh=FieldData.CoordMesh;
 end
 
