Index: trunk/src/uvmat.m
===================================================================
--- trunk/src/uvmat.m	(revision 591)
+++ trunk/src/uvmat.m	(revision 595)
@@ -73,5 +73,5 @@
 %               _____________|____________
 %              |                          |                    
-%        proj_field.m               proj_field.m       project the field on the projection objects (use calc_field.m)           
+%        proj_field.m               proj_field.m       project the field on the projection objects (use set_field_list.m)           
 %              |                          |
 %         UvData.PlotAxes          ViewData.PlotAxes (on view_field)
@@ -1041,7 +1041,8 @@
         set(handles_Fields,'Value',1)
         set(handles_Fields,'String',{'get_field...'})
-        hget_field=get_field(FileName);
-        hhget_field=guidata(hget_field);
-        get_field('RUN_Callback',hhget_field.RUN,[],hhget_field);
+        FieldName_Callback([],[], handles)
+%         hget_field=get_field(FileName);
+%         hhget_field=guidata(hget_field);
+%         get_field('RUN_Callback',hhget_field.RUN,[],hhget_field);
     otherwise
         set(handles_Fields,'Value',1) % set menu to 'image'
@@ -2121,7 +2122,11 @@
     ParamIn.VelType=VelType;
     XNameMenu=get(handles.Coord_x,'String');
-    ParamIn.Coord_x=XNameMenu(get(handles.Coord_x,'Value'));
+    if ~isempty(XNameMenu)
+        ParamIn.Coord_x=XNameMenu(get(handles.Coord_x,'Value'));
+    end
     YNameMenu=get(handles.Coord_y,'String');
-    ParamIn.Coord_y=YNameMenu(get(handles.Coord_y,'Value'));
+    if ~isempty(YNameMenu)
+        ParamIn.Coord_y=YNameMenu(get(handles.Coord_y,'Value'));
+    end
 end
 check_tps = 0;         
@@ -2597,5 +2602,6 @@
     set(handles.ListObject_1,'Visible','off')
     [PlotType,PlotParamOut]=plot_field(UvData.Field,handles.PlotAxes,read_GUI(handles.uvmat));
-    write_plot_param(handles,PlotParamOut) %update the auto plot parameters
+    errormsg=fill_GUI(PlotParamOut,handles.uvmat);
+    %write_plot_param(handles,PlotParamOut) %update the auto plot parameters
     
 %% 2D or 3D fieldname are generally projected
@@ -2704,5 +2710,10 @@
             else
                 [PlotType,PlotParamOut]=plot_field(ObjectData,haxes(imap),PlotParam{imap},PosColorbar{imap});
-                write_plot_param(plot_handles{imap},PlotParamOut) %update the auto plot parameters
+                if imap==1
+                errormsg=fill_GUI(PlotParamOut,handles.uvmat);
+                else
+                    errormsg=fill_GUI(PlotParamOut,hview_field);
+                end
+                %write_plot_param(plot_handles{imap},PlotParamOut) %update the auto plot parameters
                 if isfield(Field,'CoordMesh')&&~isempty(Field.CoordMesh)
                     ObjectData.CoordMesh=Field.CoordMesh; % gives an estimated mesh size (useful for mouse action on the plot)
@@ -3104,6 +3115,5 @@
     FieldList={};
     VecColorList={};
-    XName='';
-    YName='';
+    XName=GetFieldData.XVarName;
     if GetFieldData.CheckVector
         UName=GetFieldData.PanelVectors.vector_x;
@@ -3113,24 +3123,10 @@
         CName=GetFieldData.PanelVectors.vec_color;
         [FieldList,VecColorList]=set_field_list(UName,VName,CName);
-%         FieldList={['vec(' UName ',' VName ')'];...
-%             ['norm(' UName ',' VName ')'];...
-%             ['curl(' UName ',' VName ')'];...
-%             ['div(' UName ',' VName ')'];...
-%             ['strain(' UName ',' VName ')']};
-%         VecColorList={['norm(' UName ',' VName ')'];...
-%             UName;...
-%             VName};...
-%             if ~isempty(CName)
-%             VecColorList=[{CName};VecColorList];
-%             end
-    end
-    if GetFieldData.CheckScalar
+    elseif GetFieldData.CheckScalar
         AName=GetFieldData.PanelScalar.scalar;
         XName=GetFieldData.XVarName;
         YName=GetFieldData.YVarName;
         FieldList={AName};
-    end
-    if GetFieldData.CheckPlot1D
-        XName=GetFieldData.CheckPlot1D.abscissa;
+    elseif GetFieldData.CheckPlot1D;
         YName=GetFieldData.CheckPlot1D.ordinate;
     end
@@ -4101,5 +4097,6 @@
 PlotParam=read_GUI(handles.uvmat);
 [tild,PlotParamOut]= plot_field(AxeData,handles.PlotAxes,PlotParam);
-write_plot_param(handles,PlotParamOut); %update the auto plot parameters
+errormsg=fill_GUI(PlotParamOut,handles.uvmat);
+%write_plot_param(handles,PlotParamOut); %update the auto plot parameters
 
 %------------------------------------------------------------------------
@@ -4183,6 +4180,7 @@
     hhview_field=guidata(hview_field);
     ProjData= proj_field(UvData.Field,ObjectData);%project the current interface field on ObjectData
-    [PlotType,PlotParam]=plot_field(ProjData,hhview_field.PlotAxes,read_GUI(hview_field));%read plotting parameters on the uvmat interfachhview_fiel
-    write_plot_param(hhview_field,PlotParam); %update the display of plotting parameters for the current object
+    [PlotType,PlotParam]=plot_field(ProjData,hhview_field.PlotAxes,read_GUI(hview_field));%read plotting parameters on the uvmat interface
+    
+    %write_plot_param(hhview_field,PlotParam); %update the display of plotting parameters for the current object
     haxes=findobj(hview_field,'tag','axes3');
     pos=get(hview_field,'Position');  
@@ -4378,5 +4376,6 @@
     hhview_field=guidata(hview_field);
     [PlotType,PlotParam]=plot_field(ProjData,hhview_field.PlotAxes,read_GUI(hview_field));%read plotting parameters on the GUI view_field);
-    write_plot_param(hhview_field,PlotParam); %update the display of plotting parameters for the current object
+    errormsg=fill_GUI(PlotParam,hview_field);
+    %write_plot_param(hhview_field,PlotParam); %update the display of plotting parameters for the current object
     haxes=findobj(hview_field,'tag','axes3');
     pos=get(hview_field,'Position');
