Changeset 102


Ignore:
Timestamp:
Jun 13, 2010, 11:32:05 PM (11 years ago)
Author:
sommeria
Message:

bugs corrected for projection objects

Location:
trunk/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/mouse_down.m

    r87 r102  
    142142        end
    143143        ObjectData=get(AxeData.CurrentObject,'UserData');
    144         if test_edit & isfield(ObjectData,'IndexObj')
     144        if test_edit && isfield(ObjectData,'IndexObj')
    145145            hother=findobj('Tag','proj_object','Type','line');%find all the proj objects
    146146            set(hother,'Color','b');%reset all the proj objects in 'blue' by default
     
    184184            if strcmp(get(hcurrentfig,'tag'),'uvmat') %if the uvmat graph has been selected, object projection is on the other frame view_field
    185185                set(hhuvmat.list_object_2,'Value',IndexObj);
     186                list_str=get(hhuvmat.list_object_2,'String');
     187                UvData.Object{IndexObj}.Name=list_str{IndexObj};
    186188            else
    187189                set(hhuvmat.list_object_1,'Value',IndexObj);
    188             end
     190                list_str=get(hhuvmat.list_object_1,'String');
     191                UvData.Object{IndexObj}.Name=list_str{IndexObj};
     192            end
     193            h_set_object=findobj(allchild(0),'Tag','set_object');
     194            if ~isempty(h_set_object)
     195                delete(h_set_object)
     196            end
     197            set_object(UvData.Object{IndexObj})
     198            axes(haxes);%set back the current axes haxes
    189199            testdeform=0;
    190200            set(gcbo,'Pointer','circle');
     
    229239        set(huvmat,'UserData',UvData)
    230240        list_str=get(hhuvmat.list_object_1,'String');
    231         list_str{IndexObj}=[num2str(IndexObj) '-' ObjectData.Style];
     241        object_name=get(UvData.sethandles.TITLE,'String')
     242        if isempty(object_name)|| strcmp(object_name,'')
     243            list_str{IndexObj}=[num2str(IndexObj) '-' ObjectData.Style];
     244            set(UvData.sethandles.TITLE,'String',list_str{IndexObj})
     245        else
     246           list_str{IndexObj}=object_name;
     247        end
    232248        set(hhuvmat.list_object_1,'String',list_str)
    233249        list_str{end+1}='...';
     
    323339    [PlotType,ScalOut]= plot_field(AxeData,haxes,PlotParam,1);
    324340end   
    325 
    326 
    327341set(haxes,'UserData',AxeData);
    328342
    329 %------------------------------------------------------
    330 function update_plot(AxeData,haxes)
    331 %--------------------------------------------
    332 
    333 
    334 % %determine the axes of action of the set_edit interface
    335 % % haxes= findobj(huvmat,'Tag','axes3'); %main plotting axes as default
    336 % % AxeData=get(haxes,'UserData')
    337 % %For vector field representation
    338 % PlotHandles.auto_xy=findobj(huvmat,'Tag','auto_xy');
    339 % PlotHandles.VecScale=findobj(huvmat,'Tag','VecScale');
    340 % PlotHandles.AutoVec=findobj(huvmat,'Tag','AutoVec');
    341 % PlotHandles.checkyellow=findobj(huvmat,'Tag','checkyellow');
    342 % PlotHandles.checkblack=findobj(huvmat,'Tag','checkblack');
    343 % PlotHandles.col_vec=findobj(huvmat,'Tag','col_vec');
    344 % PlotHandles.colcode1=findobj(huvmat,'Tag','colcode1');
    345 % PlotHandles.colcode2=findobj(huvmat,'Tag','colcode2');
    346 % PlotHandles.vec_col_bar=findobj(huvmat,'Tag','vec_col_bar');
    347 % PlotHandles.slider1=findobj(huvmat,'Tag','slider1');
    348 % PlotHandles.slider2=findobj(huvmat,'Tag','slider2');
    349 % PlotHandles.max_vec=findobj(huvmat,'Tag','max_vec');
    350 % PlotHandles.min_vec=findobj(huvmat,'Tag','min_vec');
    351 % PlotHandles.AutoVecColor=findobj(huvmat,'Tag','AutoVecColor');
    352 % PlotHandles.decimate4=findobj(huvmat,'Tag','decimate4');
    353 %
    354 % %vectors
    355 % Vectors.VecScale=str2num(get(PlotHandles.VecScale,'String'));
    356 % Vectors.AutoVec=get(PlotHandles.AutoVec,'Value');%automatic vector length
    357 % Vectors.checkyellow=get(PlotHandles.checkyellow,'Value');
    358 % Vectors.checkblack=get(PlotHandles.checkblack,'Value');
    359 % Vectors.decimate4=get(PlotHandles.decimate4,'Value');% =1; for reducing the nbre of vectors
    360 % menu_col=get(PlotHandles.col_vec,'String');
    361 % menu_val=get(PlotHandles.col_vec,'Value');
    362 % Vectors.CName=menu_col{menu_val}; %'ima_cor','black','white',...
    363 % Vectors.colcode1=str2num(get(PlotHandles.colcode1,'String'));% first threshold for rgb, first value for'continuous'
    364 % Vectors.colcode2=str2num(get(PlotHandles.colcode2,'String'));% second threshold for rgb, last value (saturation) for 'continuous'
    365 % Vectors.option=get(PlotHandles.vec_col_bar,'Value'); % =1 (64 colors), =0 (3 colors)
    366 % Vectors.min=get(PlotHandles.slider1,'Min');
    367 % Vectors.max=get(PlotHandles.slider1,'Max');
    368 % Vectors.auto=get(PlotHandles.AutoVecColor,'Value');% =1; thresholds scaling relative to min and max, =0 fixed thresholds
    369 % PlotParam.Vectors=Vectors;
    370 
  • trunk/src/mouse_up.m

    r89 r102  
    2828   handles=get(gcbo,'UserData');
    2929end
    30 huvmat=findobj(allchild(0),'Name','uvmat');%find the uvmat interface handle
     30huvmat=findobj(allchild(0),'tag','uvmat');%find the uvmat interface handle
    3131if ~isempty(huvmat)
    3232    hhuvmat=guidata(huvmat);
     
    6262        ObjectData.Coord(ind_move,2)=xy(1,2);
    6363    else   %creating object
    64         if isequal(ObjectData.Style,'line')||isequal(ObjectData.Style,'polyline')||...
    65                 isequal(ObjectData.Style,'polygon')||isequal(ObjectData.Style,'points')
     64        if strcmp(ObjectData.Style,'line')||strcmp(ObjectData.Style,'polyline')||...
     65                strcmp(ObjectData.Style,'polygon')||strcmp(ObjectData.Style,'points')
    6666            if isfield(AxeData,'ObjectCoord') && size(AxeData.ObjectCoord,2)==3
    6767              xy(1,3)=AxeData.ObjectCoord(1,3); % z coordinate of the mouse: to generalise ...
     
    9191    end
    9292    %set(AxeData.CurrentObject,'UserData',ObjectData); %update the object properties
    93     if isequal(ObjectData.Style,'rectangle')||isequal(ObjectData.Style,'ellipse')
     93    if strcmp(ObjectData.Style,'rectangle')||strcmp(ObjectData.Style,'ellipse')
    9494        NbDefPoint=1; 
    95     elseif isequal(ObjectData.Style,'line')|| isequal(ObjectData.Style,'plane');
     95    elseif strcmp(ObjectData.Style,'line')|| strcmp(ObjectData.Style,'plane');
    9696        NbDefPoint=2;
    9797    else
     
    100100   
    101101    %show object coordinates in the GUI set_object
    102     h_set_object=findobj(allchild(0),'Name','set_object');
    103     h_XObject=findobj(h_set_object,'Tag','XObject');
    104     h_YObject=findobj(h_set_object,'Tag','YObject');
    105     h_ZObject=findobj(h_set_object,'Tag','ZObject');
    106     set(h_XObject,'String',num2str(ObjectData.Coord(:,1),4));
    107     set(h_YObject,'String',num2str(ObjectData.Coord(:,2),4));
    108     set(h_ZObject,'String',num2str(ObjectData.Coord(:,3),4));
     102    h_set_object=findobj(allchild(0),'Tag','set_object');
     103    hh_set_object=guidata(h_set_object);
     104    set(hh_set_object.XObject,'String',num2str(ObjectData.Coord(:,1),4));
     105    set(hh_set_object.YObject,'String',num2str(ObjectData.Coord(:,2),4));
     106    set(hh_set_object.ZObject,'String',num2str(ObjectData.Coord(:,3),4));
    109107    if NbDefPoint<=2 || isequal(get(currentfig,'SelectionType'),'alt') ||...
    110               isequal(AxeData.Drawing,'translate') || isequal(AxeData.Drawing,'deform');%stop drawing
     108              strcmp(AxeData.Drawing,'translate') || strcmp(AxeData.Drawing,'deform');%stop drawing
    111109        AxeData.CurrentOrigin=[]; %suppress the current origin
    112110       if isequal(ObjectData.Style,'line') && size(ObjectData.Coord,1)<=1
     
    126124                 PlotHandles=get_plot_handles(handles);%get the handles of the graphic objects setting the plotting parameters
    127125             end
    128             AxeData.hset_object=set_object(ObjectData,PlotHandles);% call the set_object interface ,*
    129126            UvData.Object{IndexObj}=update_obj(UvData,IndexObj,ObjectData,PlotHandles);
    130             %ObjectData=update_obj(UvData,IndexObj,ObjectData,PlotHandles);
    131127            if  isfield(UvData.Object{IndexObj},'PlotParam')
    132128                write_plot_param(PlotHandles,UvData.Object{IndexObj}.PlotParam); %update the display of plotting parameters for the current object
    133             end             
    134 %             set(hhuvmat.create,'Value',0);% set to 'off' the button for object creation
    135 %             set(hhuvmat.create,'BackgroundColor',[0 1 0]);% paint the creation button in green
     129            end   
    136130            set(hhuvmat.edit,'BackgroundColor',[1 1 0]);% paint the edit text in yellow
    137131            set(hhuvmat.edit,'Value',1);%
     
    139133            set(hhuvmat.MenuEditObject,'Enable','on');%
    140134            set(hhuvmat.MenuEdit,'Enable','on');%
    141 %             set(hhuvmat.MenuObject,'Enable','on');%
    142135            UvData.MouseAction='edit_object'; % set the edit button to 'on'
    143136        end
     
    152145    test_drawing=0;
    153146end
    154 
    155147%creation of a new zoom plot
    156148test_replot=0;
     
    235227     %zoom out by a factor of 2 out when the right mouse button has been used
    236228     elseif isequal(get(currentfig,'SelectionType'),'alt'); %if right button has been pressed
    237             alpha=2; %zoom factor (zoom out by a factor 2)
     229%             alpha=2; %zoom factor (zoom out by a factor 2)
    238230            xlim=get(currentaxes,'XLim');
    239231            xlim_new(1)=2*xlim(1)-xy(1,1);
     
    344336    end
    345337    if ((nbselect==0) && isequal(get(currentobj,'Type'),'axes')) || isequal(currentobj,huvmat)
    346         global Data_uvmat
    347         Data_uvmat=get(currentobj,'UserData');
    348         %plot_text(CurData)
    349         %get_field([],CurData);
    350         evalin('base','global Data_uvmat')%make CurData global in the workspace
     338        currentfig=get(currentobj,'parent');
     339        figname=get(currentfig,'name');
     340        eval(['global Data_' figname])
     341        eval(['Data_' figname '=get(currentobj,''UserData'')']);
     342        evalin('base',['global Data_' figname])%make CurData global in the workspace
    351343        objtype=get(currentobj,'Type');
    352344        display(['UserData of ' objtype ':'])
    353         evalin('base','Data_uvmat') %display CurData in the workspace
     345        evalin('base',['Data_' figname]) %display CurData in the workspace
    354346        commandwindow %brings the Matlab command window to the front
    355347    end
  • trunk/src/plot_field.m

    r99 r102  
    229229
    230230
    231 set(haxes,'UserData',AxeData)
     231%set(haxes,'UserData',AxeData)
     232set(haxes,'UserData',Data)
    232233if ~testnewfig
    233234set(0,'Children',hstack);%put back the initial figure stack after plot creation
     
    239240function hdisplay=plot_text(FieldData,hdisplay_in)
    240241%-------------------------------------------------------------------
    241 if exist('hdisplay_in','var') && ishandle(hdisplay_in) && isequal(get(hdisplay_in,'Type'),'uicontrol')
     242hdisplay_in
     243if exist('hdisplay_in','var') && ~isempty(hdisplay_in) && ishandle(hdisplay_in) && isequal(get(hdisplay_in,'Type'),'uicontrol')
    242244    hdisplay=hdisplay_in;
    243245else
     
    965967        AxeData.FF=vec_FF';
    966968    end
    967 %     if isfield(Data,'W')
    968 %         AxeData.W=Data.W;
    969 %     end
    970969   
    971970    %decimate by a factor 2 in vector mesh(4 in nbre of vectors)
     
    995994    %get main level color code
    996995    [colorlist,col_vec,PlotParamOut.Vectors]=set_col_vec(PlotParam.Vectors,vec_C);
     996   
    997997    % take flags into account: add flag colors to the list of colors
    998998    sizlist=size(colorlist);
     
    11141114set(h,'EraseMode','xor');
    11151115set(haxes,'NextPlot','replacechildren');
    1116 %htext=findobj('Tag','scalevec');
    11171116     
    11181117%drawnow
     
    11631162      hy = [y1;y2;y3];
    11641163    tri=reshape([1:3*length(uc)],3,[])';
    1165     d = tri(:,[1 2 3 1])';
    1166  
     1164    d = tri(:,[1 2 3 1])';
    11671165   
    11681166    isn=isnan(colorlist(icolor,:));%test if color NaN
  • trunk/src/series/time_series.m

    r80 r102  
    143143    end
    144144    %hhget_field=guidata(hget_field);%handles of GUI elements in get_field
    145     SubField=read_get_field(hget_field) %read the names of the variables to plot in the get_field GUI
     145    SubField=read_get_field(hget_field); %read the names of the variables to plot in the get_field GUI
    146146    if isempty(SubField)
    147147        delete(hget_field)
     
    552552    delete(hget_field)
    553553end
    554 RecordData
    555554
    556555get_field(filemean,RecordData)
  • trunk/src/set_col_vec.m

    r19 r102  
    2424if isempty(vec_C) || ~isnumeric(vec_C)
    2525    colorlist=[0 0 1]; %blue 
     26    col_vec=ones(size(vec_C));
    2627    return
    2728end
     
    3839if ~isfield(colcode,'ColorCode') || isempty(colcode.ColorCode)
    3940    colorlist=[0 0 1]; %blue 
     41    col_vec=ones(size(vec_C));
    4042    return
    4143end
     
    5254colcode_out.MinC=minC;
    5355colcode_out.MaxC=maxC;
    54 
    5556if strcmp(colcode.ColorCode,'black')
    5657    colorlist(1,:)=[0 0 0];%black
  • trunk/src/set_object.m

    r82 r102  
    1515%    .RangeX, RangeY
    1616%    .Coord(j,i), i=1, 2, 3,  components x, y, z of j=1...n position(s) characterizing the object components
    17 % PlotHandles: handles for projection plots
     17% PlotHandles: handles for projection plots NO MORE USED
    1818% Zbounds: bounds on Z ( 3D case)
    1919%
     
    8585set(hObject,'KeyPressFcn',{'keyboard_callback',handles})%set keyboard action function (allow action on uvmat when set_object is in front)
    8686set(handles.MenuCoord,'ListboxTop',1)
    87 if ~exist('PlotHandles','var')
    88      PlotHandles=[];
    89 end
     87% if ~exist('PlotHandles','var')
     88%      PlotHandles=[];
     89% end
    9090enable_plot=0;%default: does not allow plot of object and projection
    9191% SetData.PlotHandles=PlotHandles;
     
    9999    if isfield(data,'Name')
    100100        set(handles.TITLE,'String',data.Name)
    101         set(hObject,'name',data.Name)
     101%         set(hObject,'name',data.Name)
    102102    end
    103103    if ~isfield(data,'NbDim')||~isequal(data.NbDim,3)%2D case
     
    776776UvData=get(huvmat,'UserData');%Data associated to the GUI uvmat
    777777hhuvmat=guidata(huvmat);%handles in the uvmat GUI
    778 ObjectName=get(handles.set_object,'name');%name ome)f the current object (set_object na
     778ObjectName=get(handles.TITLE,'String');%name ome)f the current object (set_object na
    779779ListObject=get(hhuvmat.list_object_1,'String');%position in the objet list
    780780IndexObj_1=get(hhuvmat.list_object_1,'Value');
     
    785785PlotHandles=[];%default
    786786testnew=0;
     787PlotHandles=get_plot_handles(hhuvmat);
    787788if strcmp(ListObject{IndexObj_1},ObjectName)% we are editing the object whose projection is viewed in the uvmat frame
    788789   ObjectData.HandlesDisplay=hhuvmat.axes3;
    789     PlotHandles=get_plot_handles(hhuvmat);
    790790    IndexObj=IndexObj_1;
    791791elseif IndexObj_2<=numel(ListObject)&& strcmp(ListObject{IndexObj_2},ObjectName)% we are editing the object whose projection is viewed in view_field
     
    793793    if ~isempty(hview_field)
    794794        PlotHandles=guidata(hview_field);
    795 %         PlotHandles=get_plot_handles( hhview_field);
    796795        ObjectData.HandlesDisplay=PlotHandles.axes3;%handle of axes3 in view_field
    797796    end
     
    806805%     set(hhuvmat.list_object_2,'Value',IndexObj)
    807806end
    808 ObjectName=get(handles.TITLE,'String');
     807% ObjectName=get(handles.TITLE,'String');
    809808if length(ObjectName)<1
    810809    ObjectName=[num2str(IndexObj) '-' ObjectData.Style];
     
    820819set(hhuvmat.list_object_1,'String',ListObject)
    821820set(hhuvmat.list_object_2,'String',[ListObject;{'...'}])
    822 set(handles.set_object,'name',ObjectName);%update the name of set_object so that it equals its corresponding object in the list
    823821if testnew
    824822    set(hhuvmat.list_object_2,'Value',IndexObj)
    825823end
    826 % ObjectData.HandlesDisplay=[]; % new object plot by default
    827 % if length(UvData.Object) >= IndexObj && isfield(UvData.Object{IndexObj},'HandlesDisplay')
    828 %     hdisplay=UvData.Object{IndexObj}.HandlesDisplay;
    829 %     if isequal(UvData.Object{IndexObj}.Style, ObjectData.Style) && isequal(UvData.Object{IndexObj}.ProjMode, ObjectData.ProjMode)
    830 %         ObjectData.HandlesDisplay=UvData.Object{IndexObj}.HandlesDisplay;
    831 %     else  % for a new object styl, delete the existing object plots
    832 %         for ih=1:length(hdisplay)
    833 %             PlotData=get(hdisplay(ih),'UserData');
    834 %             if isfield(PlotData,'SubObject') & ishandle(PlotData.SubObject)
    835 %                     delete(PlotData.SubObject);
    836 %             end
    837 %             if isfield(PlotData,'DeformPoint') & ishandle(PlotData.DeformPoint)
    838 %                    delete(PlotData.DeformPoint);
    839 %             end
    840 %             if ~isequal(hdisplay(ih),0)
    841 %                 delete(hdisplay(ih));
    842 %             end
    843 %         end
    844 %         if isfield(ObjectData,'plotaxes') && ishandle(ObjectData.plotaxes)
    845 %             delete(ObjectData.plotaxes)%delete the axes for plotting the current projection result
    846 %         end
    847 %     end     
    848 % end
    849824
    850825% update the object plot and projection field
    851826UvData.Object{IndexObj}=update_obj(UvData,IndexObj,ObjectData,PlotHandles);
    852 
    853827set(huvmat,'UserData',UvData)%update the data in the uvmat interface
    854 % list_str=get(hlist_object,'String');
    855 % list_str{IndexObj}=[num2str(IndexObj) '-' ObjectData.Style];
    856 % set(hlist_object_1,'String',list_str)
    857 % set(hlist_object_1,'Value',IndexObj)
    858828
    859829%set uvmat to object edit mode to allow further object update
  • trunk/src/update_obj.m

    r99 r102  
    6767if ~isempty(ProjData)   
    6868    plotaxes=[];%default
    69 %         get(Object_set{IndexObj}.plotaxes)
    7069    if length(Object_set)>= IndexObj && isfield(Object_set{IndexObj},'plotaxes')
    7170        plotaxes=Object_set{IndexObj}.plotaxes;
    72         [PlotType,Object_out.PlotParam,plotaxes]=plot_field(ProjData,plotaxes,PlotHandles);
     71        [PlotType,Object_out.PlotParam,plotaxes]=plot_field(ProjData,plotaxes,PlotHandles);       
    7372    else
    74          [plotaxes]=view_field(ProjData);
     73        [plotaxes]=view_field(ProjData);
    7574    end
    76 %         [PlotType,Object_out.PlotParam,plotaxes]=plot_field(ProjData,plotaxes,PlotHandles);
    7775    Object_out.plotaxes=plotaxes;
    78 %     plotfig=get(plotaxes,'parent');
    79 %     name_str=get(plotfig,'Name');
    80 %     if ~isequal(name_str,'uvmat')
    81 %         set(plotfig,'Name',['Projection on' num2str(IndexObj) '-' ObjectData.Style]);
    82 %     end
    8376end
    8477
  • trunk/src/uvmat.m

    r101 r102  
    43624362% end
    43634363% set(handles.uvmat,'UserData',UvData)
    4364 % hother=findobj('Tag','proj_object');%find all the proj objects
    4365 % for iobj=1:length(hother)
    4366 %     if isequal(get(hother(iobj),'Type'),'rectangle')|isequal(get(hother(iobj),'Type'),'patch')
    4367 %         set(hother(iobj),'EdgeColor','b')
    4368 %         if isequal(get(hother(iobj),'FaceColor'),'m')
    4369 %             set(hother(iobj),'FaceColor','b')
    4370 %         end
    4371 %     elseif isequal(get(hother(iobj),'Type'),'image')
    4372 %            Acolor=get(hother(iobj),'CData');
    4373 %            Acolor(:,:,1)=zeros(size(Acolor,1),size(Acolor,2));
    4374 %            set(hother(iobj),'CData',Acolor);
    4375 %     else
    4376 %          set(hother(iobj),'Color','b')
    4377 %     end
    4378 %     set(hother(iobj),'Selected','off')
    4379 % end
     4364hother=findobj('Tag','proj_object');%find all the proj objects
     4365for iobj=1:length(hother)
     4366    if isequal(get(hother(iobj),'Type'),'rectangle')|isequal(get(hother(iobj),'Type'),'patch')
     4367        set(hother(iobj),'EdgeColor','b')
     4368        if isequal(get(hother(iobj),'FaceColor'),'m')
     4369            set(hother(iobj),'FaceColor','b')
     4370        end
     4371    elseif isequal(get(hother(iobj),'Type'),'image')
     4372           Acolor=get(hother(iobj),'CData');
     4373           Acolor(:,:,1)=zeros(size(Acolor,1),size(Acolor,2));
     4374           set(hother(iobj),'CData',Acolor);
     4375    else
     4376         set(hother(iobj),'Color','b')
     4377    end
     4378    set(hother(iobj),'Selected','off')
     4379end
    43804380hother=findobj('Tag','DeformPoint');
    43814381set(hother,'Color','b');
  • trunk/src/view_field.m

    r99 r102  
    8282set(hObject,'Position',pos_view_field)
    8383
    84 
    85 
    8684%functions for the mouse and keyboard
    8785set(hObject,'KeyPressFcn',{'keyboard_callback',handles_mouse})%set keyboard action function
     
    9189set(hObject,'CloseRequestFcn',{@closefcn})%
    9290
    93 [PlotType,PlotParamOut,haxes]= plot_field(Field,handles.axes3);%,PlotParam,KeepLim,PosColorbar)
     91[PlotType,PlotParamOut]= plot_field(Field,handles.axes3);%,PlotParam,KeepLim,PosColorbar)
    9492set(handles.axes3,'UserData',Field);%store the current field
    9593if isfield(PlotParamOut,'Vectors')
     
    690688set(handles.vec_col_bar,'Cdata',A)
    691689
    692 
    693690%-------------------------------------------------------------------
    694691function [PlotType,ScalOut]=update_plot(handles)
    695692%-------------------------------------------------------------------
    696693haxes= handles.axes3;
    697 huvmat=findobj(allchild(0),'tag','uvmat');
     694%huvmat=findobj(allchild(0),'tag','uvmat');
    698695ProjField=get(haxes,'UserData');
    699 %
    700 % AxeData=get(haxes,'UserData');
    701696PlotParam=read_plot_param(handles);
    702697[PlotType,PlotParamOut]= plot_field(ProjField,haxes,PlotParam,1);
     
    708703function MenuExportField_Callback(hObject, eventdata, handles)
    709704
    710 global CurData
    711 huvmat=findobj(allchild(0),'Name','uvmat');
    712 UvData=get(huvmat,'UserData');
    713 CurData=UvData.ProjField_2;
    714 evalin('base','global CurData')%make CurData global in the workspace
     705global Data_view_field
     706% huvmat=findobj(allchild(0),'Name','uvmat');
     707Data_view_field=get(handles.axes3,'UserData');
     708% Data_view_field=UvData.ProjField_2;
     709evalin('base','global Data_view_field')%make CurData global in the workspace
    715710display(['UserData of view_field :'])
    716 evalin('base','CurData') %display CurData in the workspace
     711evalin('base','Data_view_field') %display CurData in the workspace
    717712commandwindow;
    718713
     
    753748
    754749
    755 function edit88_Callback(hObject, eventdata, handles)
    756 
    757 
    758 
    759 % --- Executes on button press in AutoScal.
    760 function checkbox40_Callback(hObject, eventdata, handles)
    761 % hObject    handle to AutoScal (see GCBO)
    762 % eventdata  reserved - to be defined in a future version of MATLAB
    763 % handles    structure with handles and user data (see GUIDATA)
    764 
    765 % Hint: get(hObject,'Value') returns toggle state of AutoScal
    766 
    767 
    768 
    769 function edit82_Callback(hObject, eventdata, handles)
    770 
    771 
    772 
    773 function edit83_Callback(hObject, eventdata, handles)
    774 % hObject    handle to min_vec (see GCBO)
    775 % eventdata  reserved - to be defined in a future version of MATLAB
    776 % handles    structure with handles and user data (see GUIDATA)
    777 
    778 % Hints: get(hObject,'String') returns contents of min_vec as text
    779 %        str2double(get(hObject,'String')) returns contents of min_vec as a double
    780 
    781750
    782751% --- Executes on slider movement.
     
    799768%        get(hObject,'Min') and get(hObject,'Max') to determine range of
    800769%        slider
    801 
    802 
    803 % --- Executes on button press in AutoVecColor.
    804 function checkbox41_Callback(hObject, eventdata, handles)
    805 % hObject    handle to AutoVecColor (see GCBO)
    806 % eventdata  reserved - to be defined in a future version of MATLAB
    807 % handles    structure with handles and user data (see GUIDATA)
    808 
    809 % Hint: get(hObject,'Value') returns toggle state of AutoVecColor
    810 
    811 
    812 function edit89_Callback(hObject, eventdata, handles)
    813 % hObject    handle to max_vec (see GCBO)
    814 % eventdata  reserved - to be defined in a future version of MATLAB
    815 % handles    structure with handles and user data (see GUIDATA)
    816 
    817 % Hints: get(hObject,'String') returns contents of max_vec as text
    818 %        str2double(get(hObject,'String')) returns contents of max_vec as a double
    819 
    820 
    821 function edit90_Callback(hObject, eventdata, handles)
    822 % hObject    handle to colcode2 (see GCBO)
    823 % eventdata  reserved - to be defined in a future version of MATLAB
    824 % handles    structure with handles and user data (see GUIDATA)
    825 
    826 % Hints: get(hObject,'String') returns contents of colcode2 as text
    827 %        str2double(get(hObject,'String')) returns contents of colcode2 as a double
    828 
    829 
    830770
    831771
     
    839779
    840780
    841 % --- Executes on button press in checkbox42.
    842 function checkbox42_Callback(hObject, eventdata, handles)
    843 % hObject    handle to checkbox42 (see GCBO)
    844 % eventdata  reserved - to be defined in a future version of MATLAB
    845 % handles    structure with handles and user data (see GUIDATA)
    846 
    847 % Hint: get(hObject,'Value') returns toggle state of checkbox42
    848 
    849 
    850 % --- Executes on button press in checkbox43.
    851 function checkbox43_Callback(hObject, eventdata, handles)
    852 % hObject    handle to checkbox43 (see GCBO)
    853 % eventdata  reserved - to be defined in a future version of MATLAB
    854 % handles    structure with handles and user data (see GUIDATA)
    855 
    856 % Hint: get(hObject,'Value') returns toggle state of checkbox43
    857 
    858 
    859 % --- Executes on button press in checkbox44.
    860 function checkbox44_Callback(hObject, eventdata, handles)
    861 % hObject    handle to checkbox44 (see GCBO)
    862 % eventdata  reserved - to be defined in a future version of MATLAB
    863 % handles    structure with handles and user data (see GUIDATA)
    864 
    865 % Hint: get(hObject,'Value') returns toggle state of checkbox44
    866 
    867 
    868781% --- Executes on selection change in popupmenu18.
    869782function popupmenu18_Callback(hObject, eventdata, handles)
Note: See TracChangeset for help on using the changeset viewer.