Index: /trunk/src/plot_field.m
===================================================================
--- /trunk/src/plot_field.m	(revision 728)
+++ /trunk/src/plot_field.m	(revision 729)
@@ -406,63 +406,65 @@
         end
     end
-    MinX(icell)=min(coord_x{icell});
-    MaxX(icell)=max(coord_x{icell});
-    testplot(coord_x_index)=0;
-    if isfield(CellInfo{icell},'VarIndex_ancillary')
-        testplot(CellInfo{icell}.VarIndex_ancillary)=0;
-    end
-    if isfield(CellInfo{icell},'VarIndex_warnflag')
-        testplot(CellInfo{icell}.VarIndex_warnflag)=0;
-    end
-    if isfield(data,'VarAttribute')
-        VarAttribute=data.VarAttribute;
+    if ~isempty(coord_x{icell})
+        MinX(icell)=min(coord_x{icell});
+        MaxX(icell)=max(coord_x{icell});
+        testplot(coord_x_index)=0;
+        if isfield(CellInfo{icell},'VarIndex_ancillary')
+            testplot(CellInfo{icell}.VarIndex_ancillary)=0;
+        end
+        if isfield(CellInfo{icell},'VarIndex_warnflag')
+            testplot(CellInfo{icell}.VarIndex_warnflag)=0;
+        end
+        if isfield(data,'VarAttribute')
+            VarAttribute=data.VarAttribute;
+            for ivar=1:length(VarIndex)
+                if length(VarAttribute)>=VarIndex(ivar) && isfield(VarAttribute{VarIndex(ivar)},'long_name')
+                    plotname{VarIndex(ivar)}=VarAttribute{VarIndex(ivar)}.long_name;
+                else
+                    plotname{VarIndex(ivar)}=data.ListVarName{VarIndex(ivar)};%name for display in plot A METTRE
+                end
+            end
+        end
+        if isfield(CellInfo{icell},'VarIndex_discrete')
+            charplot_0='''+''';
+        else
+            charplot_0='''-''';
+        end
+        MinY=[];
+        MaxY=[];%default
+        
+        nbplot=0;
         for ivar=1:length(VarIndex)
-            if length(VarAttribute)>=VarIndex(ivar) && isfield(VarAttribute{VarIndex(ivar)},'long_name')
-                plotname{VarIndex(ivar)}=VarAttribute{VarIndex(ivar)}.long_name;
-            else
-                plotname{VarIndex(ivar)}=data.ListVarName{VarIndex(ivar)};%name for display in plot A METTRE
-            end
-        end
-    end
-    if isfield(CellInfo{icell},'VarIndex_discrete')
-        charplot_0='''+''';
-    else
-        charplot_0='''-''';
-    end
-    MinY=[];
-    MaxY=[];%default
-    
-    nbplot=0;
-    for ivar=1:length(VarIndex)
-        if testplot(VarIndex(ivar))
-            VarName=data.ListVarName{VarIndex(ivar)};
-            nbplot=nbplot+1;
-            ytitle=[ytitle VarName];
-            if isfield(data,'VarAttribute')&& numel(data.VarAttribute)>=VarIndex(ivar) && isfield(data.VarAttribute{VarIndex(ivar)},'units')
-                ytitle=[ytitle '(' data.VarAttribute{VarIndex(ivar)}.units '), '];
-            else
-                ytitle=[ytitle ', '];
-            end
-            eval(['data.' VarName '=squeeze(data.' VarName ');'])
-            MinY(ivar)=min(min(data.(VarName)));
-            MaxY(ivar)=max(max(data.(VarName)));
-            plotstr=[plotstr 'coord_x{' num2str(icell) '},data.' VarName ',' charplot_0 ','];
-            eval(['nbcomponent2=size(data.' VarName ',2);']);
-            eval(['nbcomponent1=size(data.' VarName ',1);']);
-            if numel(coord_x{icell})==2
-                coord_x{icell}=linspace(coord_x{icell}(1),coord_x{icell}(2),nbcomponent1);
-            end
-            if nbcomponent1==1|| nbcomponent2==1
-                legend_str=[legend_str {VarName}]; %variable with one component
-            else  %variable with severals  components
-                for ic=1:min(nbcomponent1,nbcomponent2)
-                    legend_str=[legend_str [VarName '_' num2str(ic)]]; %variable with severals  components
-                end                                                   % labeled by their index (e.g. color component)
-            end
-        end
-    end
-    if ~isempty(MinY)
-        MinY_cell(icell)=min(MinY);
-        MaxY_cell(icell)=max(MaxY);
+            if testplot(VarIndex(ivar))
+                VarName=data.ListVarName{VarIndex(ivar)};
+                nbplot=nbplot+1;
+                ytitle=[ytitle VarName];
+                if isfield(data,'VarAttribute')&& numel(data.VarAttribute)>=VarIndex(ivar) && isfield(data.VarAttribute{VarIndex(ivar)},'units')
+                    ytitle=[ytitle '(' data.VarAttribute{VarIndex(ivar)}.units '), '];
+                else
+                    ytitle=[ytitle ', '];
+                end
+                eval(['data.' VarName '=squeeze(data.' VarName ');'])
+                MinY(ivar)=min(min(data.(VarName)));
+                MaxY(ivar)=max(max(data.(VarName)));
+                plotstr=[plotstr 'coord_x{' num2str(icell) '},data.' VarName ',' charplot_0 ','];
+                eval(['nbcomponent2=size(data.' VarName ',2);']);
+                eval(['nbcomponent1=size(data.' VarName ',1);']);
+                if numel(coord_x{icell})==2
+                    coord_x{icell}=linspace(coord_x{icell}(1),coord_x{icell}(2),nbcomponent1);
+                end
+                if nbcomponent1==1|| nbcomponent2==1
+                    legend_str=[legend_str {VarName}]; %variable with one component
+                else  %variable with severals  components
+                    for ic=1:min(nbcomponent1,nbcomponent2)
+                        legend_str=[legend_str [VarName '_' num2str(ic)]]; %variable with severals  components
+                    end                                                   % labeled by their index (e.g. color component)
+                end
+            end
+        end
+        if ~isempty(MinY)
+            MinY_cell(icell)=min(MinY);
+            MaxY_cell(icell)=max(MaxY);
+        end
     end
 end
Index: /trunk/src/set_object.m
===================================================================
--- /trunk/src/set_object.m	(revision 728)
+++ /trunk/src/set_object.m	(revision 729)
@@ -578,5 +578,5 @@
     % update the representation of all objects in view_field
     for iobj=1:numel(UvData.ProjObject)
-        if isfield(UvData.ProjObject{iobj}.DisplayHandle,'view_field')
+        if isfield(UvData.ProjObject{iobj},'DisplayHandle') && isfield(UvData.ProjObject{iobj}.DisplayHandle,'view_field')
             UvData.ProjObject{iobj}.DisplayHandle.view_field=...
                 plot_object(UvData.ProjObject{iobj},UvData.ProjObject{iobj},UvData.ProjObject{iobj}.DisplayHandle.view_field,'b');
Index: /trunk/src/uvmat.m
===================================================================
--- /trunk/src/uvmat.m	(revision 728)
+++ /trunk/src/uvmat.m	(revision 729)
@@ -3708,5 +3708,5 @@
 list_path=get(handles.TransformName,'UserData');
 
-%% handles uicontrol visibility
+%% handles  visibility of the path to the transform function
 if isempty(transform_name)
     set(handles.TransformPath,'Visible','off')
@@ -3714,5 +3714,4 @@
     set(handles.TransformPath,'Visible','on')
 end
-
 
 %% add a new item to the menu if the option 'more...' has been selected
@@ -3787,6 +3786,6 @@
 if ~isempty(list_path{ichoice}) 
     if nargin(transform_handle)>1 && isfield(UvData,'XmlData')&&~isempty(UvData.XmlData)
-        XmlData=UvData.XmlData{1};
-        DataOut=feval(transform_handle,'*',XmlData);
+        %XmlData=UvData.XmlData{1};
+        DataOut=feval(transform_handle,'*',UvData.XmlData{1});
         if isfield(DataOut,'CoordUnit')% set the requested coord unit (info used to possibly delete the current projection objects)
             CoordUnit=DataOut.CoordUnit;
@@ -3795,12 +3794,13 @@
             UvData.InputFieldType=DataOut.InputFieldType;
         end
-        if isfield(DataOut,'XmlData')%  used to add transform parameters at selection of the transform fct
-            ListFields=fieldnames(DataOut.XmlData);
-            for ilist=1:numel(ListFields)
-            UvData.XmlData{1}.(ListFields{ilist})=DataOut.XmlData.(ListFields{ilist});
-            end
-        end
-    else
-        DataOut=feval(transform_handle,'*');
+        if isfield(DataOut,'TransformInput')%  used to add transform parameters at selection of the transform fct
+            UvData.XmlData{1}.TransformInput=DataOut.TransformInput;
+%             ListFields=fieldnames(DataOut.XmlData);
+%             for ilist=1:numel(ListFields)
+%             UvData.XmlData{1}.(ListFields{ilist})=DataOut.XmlData.(ListFields{ilist});
+%             end
+        end
+%     else
+%         DataOut=feval(transform_handle,'*');
     end
 end
@@ -4260,4 +4260,7 @@
 IndexObj=get(handles.ListObject,'Value');%present object selection
 UvData=get(handles.uvmat,'UserData');
+if numel(UvData.ProjObject)<IndexObj
+    return
+end
 ObjectData=UvData.ProjObject{IndexObj};
     ZBounds=0; % default
@@ -4546,8 +4549,9 @@
     end
     UvData.ProjObject(IndexObj)=[];
+end
     if ~isempty(list_str)
         list_str(IndexObj)=[];
     end
-end
+% end
 set(huvmat,'UserData',UvData);
 set(hlist_object,'String',list_str)
