Index: /trunk/src/calc_field_interp.m
===================================================================
--- /trunk/src/calc_field_interp.m	(revision 649)
+++ /trunk/src/calc_field_interp.m	(revision 650)
@@ -32,10 +32,11 @@
     r=regexp(FieldName{ilist},'(?<Operator>(^vec|^norm|^curl|^div|^strain))\((?<UName>.+),(?<VName>.+)\)$','names');% analyse the field name
     if isempty(r) % the field name is a variable itself
-        ivar=strcmp(FieldName{ilist},Data.ListVarName);
+        ivar=find(strcmp(FieldName{ilist},Data.ListVarName));
         if isempty(ivar)
             check_skipped(ilist)=1; %variable not found
         else
-            if isfield(Data.VarAttribute{ivar},'Role')&&strcmp(Data.VarAttribute{ivar}.Role,'ancillary')
-                check_skipped(ilist)=1; % ancillary variable, not found interpolated      
+            if isfield(Data.VarAttribute{ivar},'Role') &&...
+                (strcmp(Data.VarAttribute{ivar}.Role,'ancillary')||strcmp(Data.VarAttribute{ivar}.Role,'warnflag')||strcmp(Data.VarAttribute{ivar}.Role,'errorflag'))
+                check_skipped(ilist)=1; % ancillary variable, not interpolated      
             elseif isempty(find(strcmp(FieldName{ilist},InputVarList), 1));
                 InputVarList=[InputVarList FieldName{ilist}];% the variable is added to the list of input variables if it is not already in the list
Index: /trunk/src/mouse_down.m
===================================================================
--- /trunk/src/mouse_down.m	(revision 649)
+++ /trunk/src/mouse_down.m	(revision 650)
@@ -59,9 +59,9 @@
     UvData=get(huvmat,'UserData');
     test_ruler=isequal(get(hhuvmat.MenuRuler,'checked'),'on');%test for ruler  action, second priority;
-    test_edit=get(hhuvmat.edit_object,'Value')&& (isequal(obj_tag,'proj_object')||isequal(obj_tag,'DeformPoint'));%test for object editing, third priority
+    test_edit=get(hhuvmat.CheckEditObject,'Value')&& (isequal(obj_tag,'proj_object')||isequal(obj_tag,'DeformPoint'));%test for object editing, third priority
     hset_object=findobj(allchild(0),'tag','set_object');
     if ~isempty(hset_object)
         hPLOT=findobj(hset_object,'tag','PLOT');
-        test_create=strcmp(get(hPLOT,'enable'),'on') &&~get(hhuvmat.edit_object,'Value');% create new object if set_object is in mode enable and uvmat not in mode 'edit_object'
+        test_create=strcmp(get(hPLOT,'enable'),'on') &&~get(hhuvmat.CheckEditObject,'Value');% create new object if set_object is in mode enable and uvmat not in mode 'EditObject'
     end
     test_edit_vect=get(hhuvmat.edit_vect,'Value') && ~test_create && ~(isequal(obj_tag,'proj_object')||isequal(obj_tag,'DeformPoint')) ;%test for vector editing,  priority 4
@@ -370,5 +370,5 @@
         UvData.ProjObject{IndexObj}.DisplayHandle.uvmat=hhuvmat.PlotAxes; % axes for plot_object
         UvData.ProjObject{IndexObj}.DisplayHandle.view_field=[]; %no plot handle before plot_field operation
-        set(hhuvmat.ViewObject,'Value',1)
+        set(hhuvmat.CheckViewObject,'Value',1)
     end
     ObjectData.Coord=[ObjectData.Coord ;xy(1,1:2)];% append the coordinates marked by the mouse to the object
Index: /trunk/src/mouse_motion.m
===================================================================
--- /trunk/src/mouse_motion.m	(revision 649)
+++ /trunk/src/mouse_motion.m	(revision 650)
@@ -54,5 +54,5 @@
 if ~isempty(huvmat)
     hhuvmat=guidata(huvmat);%handles of the elements in uvma
-    test_edit_object=get(hhuvmat.edit_object,'Value');
+    test_edit_object=get(hhuvmat.CheckEditObject,'Value');
     test_ruler=isequal(get(hhuvmat.MenuRuler,'checked'),'on');
 end
Index: /trunk/src/mouse_up.m
===================================================================
--- /trunk/src/mouse_up.m	(revision 649)
+++ /trunk/src/mouse_up.m	(revision 650)
@@ -169,9 +169,7 @@
                 end
             end
-            set(hhuvmat.ViewField,'Value',1);%
-            set(hhuvmat.edit_object,'Value',1);%           
-            set(hhuvmat.edit_object,'Enable','on');%
-%            set(hhuvmat.MenuEditObject,'Enable','on');%
-%            set(hhuvmat.MenuEdit,'Enable','on');%
+            set(hhuvmat.CheckViewField,'Value',1);%
+            set(hhuvmat.CheckEditObject,'Value',1);%           
+            set(hhuvmat.CheckEditObject,'Enable','on');%
             set(get(h_set_object,'children'),'Enable','on')
         end
Index: /trunk/src/plot_object.m
===================================================================
--- /trunk/src/plot_object.m	(revision 649)
+++ /trunk/src/plot_object.m	(revision 650)
@@ -131,6 +131,6 @@
 
 %% determine the coordinates xline, yline,xsup,xinf, yinf,ysup determining the new object plot
-test_line= isequal(ObjectData.Type,'points')|isequal(ObjectData.Type,'line')|isequal(ObjectData.Type,'polyline')|...
-    isequal(ObjectData.Type,'polygon')| isequal(ObjectData.Type,'plane')| isequal(ObjectData.Type,'volume');
+test_line= isequal(ObjectData.Type,'points')||isequal(ObjectData.Type,'line')||isequal(ObjectData.Type,'line_x')||isequal(ObjectData.Type,'line_y')||...
+    isequal(ObjectData.Type,'polyline')||isequal(ObjectData.Type,'polygon')|| isequal(ObjectData.Type,'plane')|| isequal(ObjectData.Type,'volume');
 test_patch=isequal(ObjectData.ProjMode,'inside')||isequal(ObjectData.ProjMode,'outside')||isequal(ObjectData.Type,'volume')...
     ||isequal(ObjectData.ProjMode,'mask_inside')||isequal(ObjectData.ProjMode,'mask_outside');
@@ -139,5 +139,8 @@
     yline=ObjectData.Coord(:,2);
     nbpoints=numel(xline);
-    if isequal(ObjectData.Type,'polygon')
+    if isequal(ObjectData.Type,'line_x')
+        xline=[xline; ObjectData.RangeX(2)];%creating the line
+        yline=[yline; ObjectData.RangeY(2)];%creating the line
+    elseif isequal(ObjectData.Type,'polygon')
         xline=[xline; ObjectData.Coord(1,1)];%closing the line
         yline=[yline; ObjectData.Coord(1,2)];
Index: /trunk/src/proj_field.m
===================================================================
--- /trunk/src/proj_field.m	(revision 649)
+++ /trunk/src/proj_field.m	(revision 650)
@@ -622,10 +622,10 @@
     %% identify vector components
     testU=isfield(CellInfo{icell},'VarIndex_vector_x') &&isfield(CellInfo{icell},'VarIndex_vector_y') ;% test for vectors
-    if testU
-        UName=FieldData.ListVarName{CellInfo{icell}.VarIndex_vector_x};
-        VName=FieldData.ListVarName{CellInfo{icell}.VarIndex_vector_y};
-        vector_x=FieldData.(UName);
-        vector_y=FieldData.(VName);
-    end
+%     if testU
+%         UName=FieldData.ListVarName{CellInfo{icell}.VarIndex_vector_x};
+%         VName=FieldData.ListVarName{CellInfo{icell}.VarIndex_vector_y};
+%         vector_x=FieldData.(UName);
+%         vector_y=FieldData.(VName);
+%     end
     %identify error flag
     errorflag=0; %default, no error flag
@@ -635,4 +635,6 @@
     end
     VarName=FieldData.ListVarName(VarIndex);% cell array of the names of variables to pje
+    ivar_U=[];
+    ivar_V=[];
     %% check needed object properties for unstructured positions (position given by the variables with role coord_x, coord_y
     
@@ -647,4 +649,8 @@
             coord_x=FieldData.(XName);
             coord_y=FieldData.(YName);
+            ProjData.ListVarName=[ProjData.ListVarName {XName}];
+            ProjData.VarDimName=[ProjData.VarDimName {XName}];
+            nbvar=numel(ProjData.ListVarName);
+            ProjData.VarAttribute{nbvar}.long_name='abscissa along line';
             if isequal(ProjMode,'projection')
                 if width==0
@@ -663,25 +669,34 @@
                 Xproj=(coord_x-ObjectData.Coord(1,1))*costheta + (coord_y-ObjectData.Coord(1,2))*sintheta; %projection on the line
                 [Xproj,indsort]=sort(Xproj);% sort points by increasing absissa along the projection line
+                ProjData.(XName)=Xproj;
                 for ivar=1:numel(VarIndex)
                     ProjData.(VarName{ivar})=FieldData.(VarName{ivar})(flagsel);% restrict vrtibles to the projection band
                     ProjData.(VarName{ivar})=ProjData.(VarName{ivar})(indsort);% sort by absissa
-                end
-                % project the velocity components if vectors are projected
-                if testU
-                    vector_x=ProjData.(UName);
-                    ProjData.(UName)=costheta*vector_x+sintheta*ProjData.(VName);% longitudinal component
-                    ProjData.(VName)=-sintheta*vector_x+costheta*ProjData.(VName);%transverse component
+                    ProjData.ListVarName=[ProjData.ListVarName VarName{ivar}];
+                    ProjData.VarDimName=[ProjData.VarDimName {XName}];
+                    ProjData.VarAttribute{nbvar+ivar}=FieldData.VarAttribute{VarIndex(ivar)};%reproduce var attribute
+                    if isfield(ProjData.VarAttribute{nbvar+ivar},'Role')
+                        if  strcmp(ProjData.VarAttribute{nbvar+ivar}.Role,'vector_x');
+                            ivar_U=ivar;
+                        elseif strcmp(ProjData.VarAttribute{nbvar+ivar}.Role,'vector_y');
+                            ivar_V=ivar;
+                        end
+                    end
+                    ProjData.VarAttribute{ivar+nbvar}.Role='discrete';% will promote plots of the profiles with continuous lines
                 end
             elseif isequal(ProjMode,'interp_lin')  %filtering %linear interpolation:
                 [ProjVar,ListFieldProj,VarAttribute,errormsg]=calc_field_interp([coord_x coord_y],FieldData,CellInfo{icell}.FieldName,XI,YI);
                 ProjData.X=Xproj;
-                ProjData.ListVarName=[ProjData.ListVarName {XName}];
-                ProjData.VarDimName=[ProjData.VarDimName {XName}];
-                nbvar=numel(ProjData.ListVarName);
-                ProjData.VarAttribute{nbvar}.long_name='abscissa along line';
                 ProjData.ListVarName=[ProjData.ListVarName ListFieldProj];
                 ProjData.VarAttribute=[ProjData.VarAttribute VarAttribute];
                 for ivar=1:numel(VarAttribute)
                     ProjData.VarDimName=[ProjData.VarDimName {XName}];
+                    if isfield(VarAttribute{ivar},'Role')
+                        if  strcmp(VarAttribute{ivar}.Role,'vector_x');
+                            ivar_U=ivar;
+                        elseif strcmp(VarAttribute{ivar}.Role,'vector_y');
+                            ivar_V=ivar;
+                        end
+                    end
                     ProjData.VarAttribute{ivar+nbvar}.Role='continuous';% will promote plots of the profiles with continuous lines
                     ProjData.(ListFieldProj{ivar})=ProjVar{ivar};
@@ -696,12 +711,8 @@
                     FieldVar=cat(3,FieldData.(FieldData.ListVarName{CellInfo{icell}.VarIndex_vector_x_tps}),FieldData.(FieldData.ListVarName{CellInfo{icell}.VarIndex_vector_y_tps}));
                 end
-                %                 coord_x_proj=XMin:DX:XMax;
-                %                 coord_y_proj=YMin:DY:YMax;
-                %                 np_x=numel(coord_x_proj);
-                %                 np_y=numel(coord_y_proj);
                 [DataOut,VarAttribute,errormsg]=calc_field_tps(Coord,NbCentres,SubRange,FieldVar,CellInfo{icell}.FieldName,cat(3,XI,YI));
                 ProjData.X=Xproj;
-                ProjData.ListVarName=[ProjData.ListVarName {XName}];
-                ProjData.VarDimName=[ProjData.VarDimName {XName}];
+%                 ProjData.ListVarName=[ProjData.ListVarName {XName}];
+%                 ProjData.VarDimName=[ProjData.VarDimName {XName}];
                 nbvar=numel(ProjData.ListVarName);
                 ProjData.VarAttribute{nbvar}.long_name='abscissa along line';
@@ -711,4 +722,11 @@
                 for ivar=1:numel(VarAttribute)
                     ProjData.VarDimName=[ProjData.VarDimName {XName}];
+                    if isfield(VarAttribute{ivar},'Role')
+                        if  strcmp(VarAttribute{ivar}.Role,'vector_x');
+                            ivar_U=ivar;
+                        elseif strcmp(VarAttribute{ivar}.Role,'vector_y');
+                            ivar_V=ivar;
+                        end
+                    end
                     ProjData.VarAttribute{ivar+nbvar}.Role='continuous';% will promote plots of the profiles with continuous lines
                     ProjData.(ProjVarName{ivar})=DataOut.(ProjVarName{ivar});
@@ -822,16 +840,15 @@
                     ProjData.VarAttribute{ivar}.Role='continuous';% for plot with continuous line
                 end
-                if testU
-                    vector_x =ProjData.(FieldData.ListVarName{CellInfo{icell}.VarIndex_vector_x});
-                    vector_y =ProjData.(FieldData.ListVarName{CellInfo{icell}.VarIndex_vector_y});
-                    ProjData.(FieldData.ListVarName{CellInfo{icell}.VarIndex_vector_x}) =cos(theta)*vector_x+sin(theta)*vector_y;
-                    ProjData.(FieldData.ListVarName{CellInfo{icell}.VarIndex_vector_y}) =-sin(theta)*vector_x+cos(theta)*vector_y;
-                end
-                ProjData.VarAttribute{nbvar+1}.long_name='abscissa along line';
                 if nbcolor==3
                     ProjData.VarDimName{end}={AXName,'rgb'};
                 end
             end
-    end
+    end 
+    if ~isempty(ivar_U) && ~isempty(ivar_V)
+        vector_x =ProjData.(ProjData.ListVarName{nbvar+ivar_U});
+         ProjData.(ProjData.ListVarName{nbvar+ivar_U}) =cos(theta)*vector_x+sin(theta)*ProjData.(ProjData.ListVarName{nbvar+ivar_V});
+          ProjData.(ProjData.ListVarName{nbvar+ivar_V}) =-sin(theta)*vector_x+cos(theta)*ProjData.(ProjData.ListVarName{nbvar+ivar_V});
+    end
+        
 end
 
@@ -1152,32 +1169,36 @@
                         coord_X=coord_X(indsel);
                         coord_Y=coord_Y(indsel);
+                        for ivar=1:numel(CellInfo{icell}.VarIndex)
+                            VarName=FieldData.ListVarName{CellInfo{icell}.VarIndex(ivar)};
+                            FieldData.(VarName)=FieldData.(VarName)(indsel);
+                        end
                     end
 %                     testFF=0;
-%                     nbvar=numel(ProjData.ListVarName);
-                    if isfield(CellInfo{icell},'VarIndex_vector_x')&&isfield(CellInfo{icell},'VarIndex_vector_y')
-                        VarName_x=FieldData.ListVarName{CellInfo{icell}.VarIndex_vector_x};
-                        VarName_y=FieldData.ListVarName{CellInfo{icell}.VarIndex_vector_y};
-                        if isfield(CellInfo{icell},'VarIndex_errorflag')
-                            FieldData.(VarName_x)=FieldData.(VarName_x)(indsel);
-                            FieldData.(VarName_y)=FieldData.(VarName_y)(indsel);
-                        end
-                        %FieldVar=cat(2,FieldData.(VarName_x),FieldData.(VarName_y));
-                        if ~isfield(CellInfo{icell},'CheckSub') || ~CellInfo{icell}.CheckSub
-                            vector_x_proj=numel(ProjData.ListVarName)+1;
-                            vector_y_proj=numel(ProjData.ListVarName)+2;
-                        end
-                    end
-                    if isfield(CellInfo{icell},'VarIndex_scalar')
-                        VarName_scalar=FieldData.ListVarName{CellInfo{icell}.VarIndex_scalar};
-                        if isfield(CellInfo{icell},'errorflag') && ~isempty(CellInfo{icell}.errorflag)
-                            FieldData.(VarName_scalar)=FieldData.(VarName_scalar)(indsel);
-                        end
-                    end
-                    if isfield(CellInfo{icell},'VarIndex_ancillary')% do not project ancillary data with interp
-                        FieldData=rmfield(FieldData,FieldData.ListVarName{CellInfo{icell}.VarIndex_ancillary});
-                    end
-                    if isfield(CellInfo{icell},'VarIndex_warnflag')% do not project ancillary data with interp
-                        FieldData=rmfield(FieldData,FieldData.ListVarName{CellInfo{icell}.VarIndex_warnflag});
-                    end
+%                     nbvar=numel(ProjData.ListVarName);                            
+%                     if isfield(CellInfo{icell},'VarIndex_vector_x')&&isfield(CellInfo{icell},'VarIndex_vector_y')
+%                         VarName_x=FieldData.ListVarName{CellInfo{icell}.VarIndex_vector_x};
+%                         VarName_y=FieldData.ListVarName{CellInfo{icell}.VarIndex_vector_y};
+%                         if isfield(CellInfo{icell},'VarIndex_errorflag')
+%                             FieldData.(VarName_x)=FieldData.(VarName_x)(indsel);
+%                             FieldData.(VarName_y)=FieldData.(VarName_y)(indsel);
+%                         end
+%                         %FieldVar=cat(2,FieldData.(VarName_x),FieldData.(VarName_y));
+%                         if ~isfield(CellInfo{icell},'CheckSub') || ~CellInfo{icell}.CheckSub
+%                             vector_x_proj=numel(ProjData.ListVarName)+1;
+%                             vector_y_proj=numel(ProjData.ListVarName)+2;
+%                         end
+%                     end
+%                     if isfield(CellInfo{icell},'VarIndex_scalar')
+%                         VarName_scalar=FieldData.ListVarName{CellInfo{icell}.VarIndex_scalar};
+%                         if isfield(CellInfo{icell},'errorflag') && ~isempty(CellInfo{icell}.errorflag)
+%                             FieldData.(VarName_scalar)=FieldData.(VarName_scalar)(indsel);
+%                         end
+%                     end
+%                     if isfield(CellInfo{icell},'VarIndex_ancillary')% do not project ancillary data with interp
+%                         FieldData=rmfield(FieldData,FieldData.ListVarName{CellInfo{icell}.VarIndex_ancillary});
+%                     end
+%                     if isfield(CellInfo{icell},'VarIndex_warnflag')% do not project ancillary data with interp
+%                         FieldData=rmfield(FieldData,FieldData.ListVarName{CellInfo{icell}.VarIndex_warnflag});
+%                     end
                     % interpolate and calculate field on the grid
                     [VarVal,ListFieldProj,VarAttribute,errormsg]=calc_field_interp([coord_X coord_Y],FieldData,CellInfo{icell}.FieldName,XI,YI);
Index: /trunk/src/series.m
===================================================================
--- /trunk/src/series.m	(revision 649)
+++ /trunk/src/series.m	(revision 650)
@@ -1763,5 +1763,10 @@
         %create subdirectory for oar command and log files
         DirOAR=fullfile(OutputDir,'0_OAR');
-        if ~exist(DirOAR,'dir')
+        if exist(DirOAR,'dir')% delete the content of the dir 0_OAR to allow new input
+            curdir=pwd;
+            cd(DirOAR)
+            delete('*')
+            cd(curdir)
+        else
             [tild,msg1]=mkdir(DirOAR);
             if ~strcmp(msg1,'')
Index: /trunk/src/set_object.m
===================================================================
--- /trunk/src/set_object.m	(revision 649)
+++ /trunk/src/set_object.m	(revision 650)
@@ -182,8 +182,6 @@
 if ~isempty(huvmat)
     hhuvmat=guidata(huvmat);
-%     set(hhuvmat.ViewObject_1,'value',0)% desactivate the two view buttons
-    set(hhuvmat.ViewObject,'value',0)% 
-    set(hhuvmat.edit_object,'Value',0)% desactivate the edit option
-%    set(hhuvmat.edit_object,'BackgroundColor',[0.7 0.7 0.7])%put unactivated buttons to gree
+    set(hhuvmat.CheckViewObject,'value',0)% 
+    set(hhuvmat.CheckEditObject,'Value',0)% desactivate the edit option
     % deselect the object in ListObject when view_field is closed
     if isempty(findobj(allchild(0),'Tag','view_field'))
@@ -455,5 +453,5 @@
 ListObject=get(hhuvmat.ListObject,'String');% list of objects displayed in uvmat
 
-if isequal(get(hhuvmat.edit_object,'Value'),0) %we append a new object
+if isequal(get(hhuvmat.CheckEditObject,'Value'),0) %we append a new object
     ListObject=[ListObject;{''}];
     IndexObj=length(ListObject);
@@ -491,5 +489,5 @@
 set(hhuvmat.ListObject,'String',ListObject);%complement the object list
 set(hhuvmat.ListObject_1,'String',ListObject);%complement the object list
-set(hhuvmat.ViewObject,'Value',1)% indicate that the currently selected objected is viewed on set_object
+set(hhuvmat.CheckViewObject,'Value',1)% indicate that the currently selected objected is viewed on set_object
 check_handle=isfield(UvData.ProjObject{IndexObj},'DisplayHandle') && isfield(UvData.ProjObject{IndexObj}.DisplayHandle,'uvmat')...
     && ~isempty(UvData.ProjObject{IndexObj}.DisplayHandle.uvmat) && ishandle(UvData.ProjObject{IndexObj}.DisplayHandle.uvmat);
@@ -554,5 +552,4 @@
             set(hview_field,'Position',Data.GUISize)
         end
-        %  set(hhuvmat.ViewField,'Value',1)% indicate that the field projection on the current object is plotted in view_field
     end
 end
@@ -586,9 +583,6 @@
 
 %% update the GUI uvmat
-% set(hhuvmat.MenuEditObject,'enable','on')
-set(hhuvmat.edit_object,'Value',1) % set uvmat to object edit mode to allow further object update
-%set(hhuvmat.edit_object,'BackgroundColor',[1 1 0]);% paint the edit text in yellow
-set(hhuvmat.ViewField,'Value',1)
-% set(handles.PLOT,'enable','on')
+set(hhuvmat.CheckEditObject,'Value',1) % set uvmat to object edit mode to allow further object update
+set(hhuvmat.CheckViewField,'Value',1)
 set(handles.PLOT,'BackgroundColor',[1 0 0])
 %------------------------------------------------------------------------
Index: /trunk/src/uvmat.m
===================================================================
--- /trunk/src/uvmat.m	(revision 649)
+++ /trunk/src/uvmat.m	(revision 650)
@@ -91,5 +91,5 @@
 % name in a netcdf open), it is directly read at the level of Field{1}or Field{2}.
 % Else only its name AName is recorded in Field{i}, and its field is then calculated 
-%by the fuction calc_scal after the coordinate transform or after projection on an edit_object
+%by the fuction calc_scal after the coordinate transform or after projection on an CheckEditObject
      
 % Properties attached to plotting figures (standard Matlab properties):
@@ -111,7 +111,7 @@
 %                    = calibration: move a calibration point
 %                    = CheckZoom: isolate a subregion for CheckZoom in=1 if an object is being currently drawn, 0 else (set to 0 by releasing mouse button)
-%            .CurrentOrigin: Origin of a curently drawn edit_object
+%            .CurrentOrigin: Origin of a curently drawn CheckEditObject
 %            .CurrentLine: currently drawn menuline (A REVOIR)
-%            .CurrentObject: handle of the currently drawn edit_object
+%            .CurrentObject: handle of the currently drawn CheckEditObject
 %            .CurrentRectZoom: current rectangle used for CheckZoom
 
@@ -723,4 +723,5 @@
 % the root name and indices may be corrected by including the first index i1 if a corresponding xml file exists
 [RootPath,SubDir,RootFile,i1_series,i2_series,j1_series,j2_series,NomType,FileType,FileInfo,MovieObject,i1,i2,j1,j2]=find_file_series(FilePath,[FileName FileExt]);
+
 if strcmp(FileType,'txt')
     edit(fileinput)
@@ -954,7 +955,7 @@
     set(handles.Dt_txt,'String',['Dt=' num2str(1000/imainfo.FrameRate) 'ms']);%display the elementary time interval in millisec
     if index==1
-    set(handles.TimeName,'video')
+    set(handles.TimeName,'String','video')
     else
-        set(handles.TimeName_1,'video')
+        set(handles.TimeName_1,'String','video')
     end
     ColorType='truecolor';
@@ -1027,7 +1028,7 @@
 if (isfield(XmlData,'Time')&& ~isempty(XmlData.Time))
     if index==1
-    set(handles.TimeName,'xml')
+    set(handles.TimeName,'String','xml')
     else
-       set(handles.TimeName_1,'xml') 
+       set(handles.TimeName_1,'String','xml') 
     end
 else
@@ -2402,5 +2403,5 @@
     siz=size(UvData.XmlData{1}.Time);
     if ~isempty(num_i1)&& ~isempty(num_i2) && num_i1>=0 &&siz(1)>=max(num_i1+1,num_i2+1) && siz(2)>=max(num_j1+1,num_j2+1)
-        set(handles.TimeName,'xml')% indicate that time is from xml
+        set(handles.TimeName,'String','xml')% indicate that time is from xml
         abstime=(UvData.XmlData{1}.Time(num_i1+1,num_j1+1)+UvData.XmlData{1}.Time(num_i2+1,num_j2+1))/2;%overset the time read from files
         dt=(UvData.XmlData{1}.Time(num_i2+1,num_j2+1)-UvData.XmlData{1}.Time(num_i1+1,num_j1+1));
@@ -2615,6 +2616,6 @@
             set(handles.ListObject,'Value',1);
             set(handles.ListObject,'String',{'1-PLANE'});
-            set(handles.edit_object,'Value',1)% put the plane in edit mode to enable the z cursor
-            edit_object_Callback([],[], handles)
+            set(handles.CheckEditObject,'Value',1)% put the plane in edit mode to enable the z cursor
+            CheckEditObject_Callback([],[], handles)
         end
         %multilevel case (single menuplane in a 3D space)
@@ -3527,6 +3528,6 @@
     set(handles.edit_vect,'Value',0)
     edit_vect_Callback(hObject, eventdata, handles)
-    set(handles.edit_object,'Value',0)
-%     set(handles.edit_object,'BackgroundColor',[0.7 0.7 0.7])
+    set(handles.CheckEditObject,'Value',0)
+%     set(handles.CheckEditObject,'BackgroundColor',[0.7 0.7 0.7])
 %     set(handles.cal,'Value',0)
 %     set(handles.cal,'BackgroundColor',[0 1 0])
@@ -3574,8 +3575,8 @@
     set(handles.record,'Visible','on')
     set(handles.edit_vect,'BackgroundColor',[1 1 0])
-    set(handles.edit_object,'Value',0)
+    set(handles.CheckEditObject,'Value',0)
     set(handles.CheckZoom,'Value',0)
 %     set(handles.CheckZoom,'BackgroundColor',[0.7 0.7 0.7])
-%     set(handles.edit_object,'BackgroundColor',[0.7 0.7 0.7])
+%     set(handles.CheckEditObject,'BackgroundColor',[0.7 0.7 0.7])
     set(gcf,'Pointer','arrow')
 else
@@ -3812,10 +3813,10 @@
     set(handles.ListObject_1,'Value',1)
     set(handles.ListObject_1,'String',{''})
-    set(handles.ViewObject,'value',0)
-    ViewObject_Callback(hObject, eventdata, handles)
-    set(handles.ViewField,'value',0)
-    ViewField_Callback(hObject, eventdata, handles)
-    set(handles.edit_object,'Value',0)
-    edit_object_Callback(hObject, eventdata, handles)
+    set(handles.CheckViewObject,'value',0)
+    CheckViewObject_Callback(hObject, eventdata, handles)
+    set(handles.CheckViewField,'value',0)
+    CheckViewField_Callback(hObject, eventdata, handles)
+    set(handles.CheckEditObject,'Value',0)
+    CheckEditObject_Callback(hObject, eventdata, handles)
     UvData.ProjObject={[]};
 end
@@ -4211,5 +4212,5 @@
 
 %% display the object parameters if the GUI set_object is already opened
-if ~get(handles.ViewObject,'Value')
+if ~get(handles.CheckViewObject,'Value')
     ZBounds=0; % default
     if isfield(UvData.Field,'ZMin') && isfield(UvData.Field,'ZMax')
@@ -4219,10 +4220,10 @@
     ObjectData.Name=list_str{get(handles.ListObject_1,'Value')};
     set_object(ObjectData,[],ZBounds);
-    set(handles.ViewObject,'Value',1)% show that the selected object in ListObject_1 is currently visualised
+    set(handles.CheckViewObject,'Value',1)% show that the selected object in ListObject_1 is currently visualised
 end
 
 %  desactivate the edit object mode
-set(handles.edit_object,'Value',0) 
-% set(handles.edit_object,'BackgroundColor',[0.7,0.7,0.7]) 
+set(handles.CheckEditObject,'Value',0) 
+% set(handles.CheckEditObject,'BackgroundColor',[0.7,0.7,0.7]) 
 
 %------------------------------------------------------------------------
@@ -4241,5 +4242,5 @@
 
 %% show object features if view_object isselected
-if get(handles.ViewObject,'value')
+if get(handles.CheckViewObject,'value')
     set_object(ObjectData,[],ZBounds);
 end
@@ -4252,11 +4253,11 @@
 %     ObjectData.Name=list_str{IndexObj};
 %     set_object(ObjectData,[],ZBounds);
-%     set(handles.ViewField,'Value',1)% show that the selected object in ListObject is currently visualised
+%     set(handles.CheckViewField,'Value',1)% show that the selected object in ListObject is currently visualised
 % end
 
 %%  desactivate the edit object mode for security 
-set(handles.edit_object,'Value',0) 
-
-% set(handles.edit_object,'BackgroundColor',[0.7,0.7,0.7]) 
+set(handles.CheckEditObject,'Value',0) 
+
+% set(handles.CheckEditObject,'BackgroundColor',[0.7,0.7,0.7]) 
 
 %% update the  plot on view_field if view_field is already openened
@@ -4342,9 +4343,9 @@
 
 %-------------------------------------------------------------------
-% --- Executes on selection change in edit_object.
-function edit_object_Callback(hObject, eventdata, handles)
+% --- Executes on selection change in CheckEditObject.
+function CheckEditObject_Callback(hObject, eventdata, handles)
 %-------------------------------------------------------------------
 hset_object=findobj(allchild(0),'Tag','set_object');
-if get(handles.edit_object,'Value') 
+if get(handles.CheckEditObject,'Value') 
     %suppress the other options 
     set(handles.CheckZoom,'Value',0)
@@ -4355,6 +4356,6 @@
         set(hhgeometry_calib.edit_append,'Value',0)% desactivate mouse action in geometry_calib
     end
-    set(handles.ViewObject,'value',1)
-    ViewObject_Callback(hObject, eventdata, handles)
+    set(handles.CheckViewObject,'value',1)
+    CheckViewObject_Callback(hObject, eventdata, handles)
 else % desactivate object edit mode
     if ~isempty(hset_object)% open the 
@@ -4367,8 +4368,8 @@
 
 %------------------------------------------------------------------------
-% --- Executes on button press in ViewObject.
-function ViewObject_Callback(hObject, eventdata, handles)
-%------------------------------------------------------------------------
-check_view=get(handles.ViewObject,'Value');
+% --- Executes on button press in CheckViewObject.
+function CheckViewObject_Callback(hObject, eventdata, handles)
+%------------------------------------------------------------------------
+check_view=get(handles.CheckViewObject,'Value');
 
 if check_view %activate set_object    
@@ -4392,5 +4393,5 @@
     hset_object=set_object(data,[],ZBounds);
     hhset_object=guidata(hset_object);
-    if get(handles.edit_object,'Value')% edit mode
+    if get(handles.CheckEditObject,'Value')% edit mode
         set(get(hset_object,'children'),'Enable','on')
     else
@@ -4407,8 +4408,8 @@
 
 %------------------------------------------------------------------------
-% --- Executes on button press in ViewField.
-function ViewField_Callback(hObject, eventdata, handles)
-%------------------------------------------------------------------------
-check_view=get(handles.ViewField,'Value');
+% --- Executes on button press in CheckViewField.
+function CheckViewField_Callback(hObject, eventdata, handles)
+%------------------------------------------------------------------------
+check_view=get(handles.CheckViewField,'Value');
 
 if check_view
@@ -4465,7 +4466,7 @@
 
 %------------------------------------------------------------------------
-% --- Executes on button press in delete_object.
-%------------------------------------------------------------------------
-function delete_object_Callback(hObject, eventdata, handles)
+% --- Executes on button press in DeleteObject.
+%------------------------------------------------------------------------
+function DeleteObject_Callback(hObject, eventdata, handles)
 
 IndexObj=get(handles.ListObject,'Value');%projection object selected for view_field
@@ -4475,7 +4476,7 @@
 end
 
-%'delete_object': delete a projection object, defined by its index in the Uvmat list or by its graphic handle
-%------------------------------------------------------------------------
-% function delete_object(hObject)
+%'DeleteObject': delete a projection object, defined by its index in the Uvmat list or by its graphic handle
+%------------------------------------------------------------------------
+% function DeleteObject(hObject)
 %
 % INPUT:
@@ -4714,7 +4715,31 @@
 
 % -----------------------------------------------------------------------
+% --- Callback of the Menu command line
+%------------------------------------------------------------------------
 function Menuline_Callback(hObject, eventdata, handles)
 %------------------------------------------------------------------------
 data.Type='line';
+data.ProjMode='projection';%default
+data.ProjModeMenu={};% do not restrict ProjMode menus
+create_object(data,handles)
+
+% -----------------------------------------------------------------------
+% --- Callback of the Menu command line_x
+%------------------------------------------------------------------------
+function Menuline_x_Callback(hObject, eventdata, handles)
+    msgbox_uvmat('ERROR','option not yet implemented, use line')
+    return
+data.Type='line_x';
+data.ProjMode='projection';%default
+data.ProjModeMenu={};% do not restrict ProjMode menus
+create_object(data,handles)
+
+% -----------------------------------------------------------------------
+% --- Callback of the Menu command line_y
+% -----------------------------------------------------------------------
+function Menuline_y_Callback(hObject, eventdata, handles)
+    msgbox_uvmat('ERROR','option not yet implemented, use line')
+    return
+data.Type='line_y';
 data.ProjMode='projection';%default
 data.ProjModeMenu={};% do not restrict ProjMode menus
@@ -4791,7 +4816,7 @@
     set(hhgeometry_calib.edit_append,'Value',0)% desactivate mouse action in geometry_calib
 end
-set(handles.edit_object,'Value',0)  %desactivate the object edit mode
-edit_object_Callback([],[],handles)
-set(handles.ViewObject,'Value',0) % desactivate view_object (new object created)
+set(handles.CheckEditObject,'Value',0)  %desactivate the object edit mode
+CheckEditObject_Callback([],[],handles)
+set(handles.CheckViewObject,'Value',0) % desactivate view_object (new object created)
 set(handles.CheckZoomFig,'Value',0) %desactivate zoom sub fig
 set(handles.CheckZoom,'Value',0)    %desactivate the zoom action
@@ -4808,15 +4833,23 @@
     if isfield(UvData.Field,'CoordMesh')&&~isempty(UvData.Field.CoordMesh)
         data.RangeX=[UvData.Field.XMin UvData.Field.XMax];
-        if strcmp(data.Type,'line')||strcmp(data.Type,'polyline')||strcmp(data.Type,'points')
-            data.RangeY=UvData.Field.CoordMesh;
-        else
-            data.RangeY=[UvData.Field.YMin UvData.Field.YMax];
+        switch data.Type
+            case {'line','polyline','points'}
+                data.RangeY=UvData.Field.CoordMesh;
+            case 'line_x'
+                data.RangeX=[UvData.Field.XMin UvData.Field.XMax];
+                data.RangeY=UvData.Field.CoordMesh;
+                data.Coord=[0 (UvData.Field.YMin +UvData.Field.YMax)/2];% put line at the middle of the y axis
+            case 'line_y'
+                data.RangeY=UvData.Field.CoordMesh;
+                data.Coord=[(UvData.Field.XMin +UvData.Field.XMax)/2 0];% put line at the middle of the x axis
+            case {'rectangle','ellipse'}
+                data.RangeY=[UvData.Field.YMin UvData.Field.YMax];
+                data.RangeX=UvData.Field.CoordMesh;
+                data.RangeY=UvData.Field.CoordMesh;
+            otherwise
+                data.RangeY=[UvData.Field.YMin UvData.Field.YMax];
         end
         data.DX=UvData.Field.CoordMesh;
         data.DY=UvData.Field.CoordMesh;
-        if strcmp(data.Type,'rectangle')||strcmp(data.Type,'ellipse')
-            data.RangeX=UvData.Field.CoordMesh;
-            data.RangeY=UvData.Field.CoordMesh;
-        end
     end
     if isfield(Field,'NbDim')&& isequal(Field.NbDim,3)
@@ -4830,5 +4863,5 @@
 hchild=get(hset_object,'children');
 set(hchild,'enable','on')
-set(handles.delete_object,'Visible','on')% make the object delete button visible
+set(handles.DeleteObject,'Visible','on')% make the object delete button visible
 
 %------------------------------------------------------------------------
@@ -4866,8 +4899,8 @@
 hset_object=set_object(data);% call the set_object interface
 set(get(hset_object,'children'),'enable','on')% enable edit action on elements on GUI set_object
-set(handles.edit_object,'Value',0); %suppress the object edit mode
-edit_object_Callback([],[],handles)
-% set(handles.edit_object,'BackgroundColor',[0.7,0.7,0.7])  
-set(handles.delete_object,'Visible','on')
+set(handles.CheckEditObject,'Value',0); %suppress the object edit mode
+CheckEditObject_Callback([],[],handles)
+% set(handles.CheckEditObject,'BackgroundColor',[0.7,0.7,0.7])  
+set(handles.DeleteObject,'Visible','on')
 
 
@@ -4878,5 +4911,5 @@
 % function MenuEditObject_Callback(hObject, eventdata, handles)
 % %------------------------------------------------------------------------
-% set(handles.edit_object,'Value',1)
+% set(handles.CheckEditObject,'Value',1)
 % edit_Callback(hObject, eventdata, handles)
 % 
@@ -5177,5 +5210,5 @@
 set(handles.edit_vect,'Value',0)
 edit_vect_Callback(hObject, eventdata, handles)
-% set(handles.edit_object,'BackgroundColor',[0.7 0.7 0.7])
+% set(handles.CheckEditObject,'BackgroundColor',[0.7 0.7 0.7])
 set(handles.ListObject,'Value',1)      
 
@@ -5256,9 +5289,15 @@
 %------------------------------------------------------------------------
 % -- open the GUI civ.fig for PIV
-function MenuPIV_Callback(hObject, eventdata, handles)
+function MenuCIVx_Callback(hObject, eventdata, handles)
 %------------------------------------------------------------------------
  [RootPath,SubDir,RootFile,FileIndex,FileExt]=read_file_boxes(handles);
  FileName=[fullfile(RootPath,SubDir,RootFile) FileIndex FileExt];
 civ(FileName);% interface de civ(not in the uvmat file)
+
+
+% --------------------------------------------------------------------
+function MenuPIV_Callback(hObject, eventdata, handles)
+MenuSeries_Callback(hObject, eventdata, handles)
+
 
 % --------------------------------------------------------------------
Index: /trunk/src/view_field.m
===================================================================
--- /trunk/src/view_field.m	(revision 649)
+++ /trunk/src/view_field.m	(revision 650)
@@ -186,5 +186,5 @@
 if ~isempty(huvmat)
     hhuvmat=guidata(huvmat);
-    set(hhuvmat.ViewField,'Value',0)
+    set(hhuvmat.CheckViewField,'Value',0)
     %set(hhuvmat.edit_object,'BackgroundColor',[0.7 0.7 0.7])%put unactivated buttons to gree
     % deselect the object in ListObject when view_field is closed
