Changeset 101 for trunk/src


Ignore:
Timestamp:
Jun 10, 2010, 2:18:59 AM (14 years ago)
Author:
sommeria
Message:

improve the use of view_field for projections

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/uvmat.m

    r99 r101  
    25912591end
    25922592IndexObj(1)=get(handles.list_object_1,'Value');
     2593haxes_1=handles.axes3;
    25932594if IndexObj(1)> numel(UvData.Object)
    25942595    IndexObj(1)=1;
    2595 end
     2596    haxes_1=handles.axes3;
     2597end
     2598view_field_handle=[];
    25962599IndexObj_2=get(handles.list_object_2,'Value');
    2597 if IndexObj_2 <= numel(UvData.Object)
     2600if isequal(get(handles.list_object_2,'Visible'),'on') && IndexObj_2 <= numel(UvData.Object)
    25982601    IndexObj(2)=IndexObj_2;
     2602    view_field_handle=findobj(allchild(0),'tag','view_field');
    25992603end
    26002604for imap=1:numel(IndexObj)
     
    26502654        end
    26512655        if ~isempty(ObjectData)
    2652             haxes=[];%default
    2653             if isfield(UvData.Object{iobj},'plotaxes')
    2654                 haxes=UvData.Object{iobj}.plotaxes;%axes used for representing the projection on the object
    2655             end
     2656%             haxes=[];%default
     2657%             if isfield(UvData.Object{iobj},'plotaxes')
     2658%                 haxes=UvData.Object{iobj}.plotaxes;%axes used for representing the projection on the object
     2659%             end
    26562660            PosColorbar=[];%default: no colorbar
    2657             if ishandle(haxes) & isequal(get(haxes,'Tag'),'axes3')& isfield(UvData,'PosColorbar')
     2661            if ishandle(haxes_1) & isequal(get(haxes_1,'Tag'),'axes3')& isfield(UvData,'PosColorbar')
    26582662                PosColorbar=UvData.PosColorbar;%prescribe the colorbar position on the uvmat interface
    26592663            else
    26602664                PosColorbar='*';%default position
    26612665            end
    2662             PlotParam=read_plot_param(handles);%read plotting parameters on the uvmat interface
    2663             [PlotType,ScalOut,UvData.Object{iobj}.plotaxes]=plot_field(ObjectData,haxes,PlotParam,keeplim,PosColorbar);
     2666            if imap==1 %plot on uvmat
     2667                PlotParam=read_plot_param(handles);%read plotting parameters on the uvmat interface
     2668                [PlotType,ScalOut,UvData.Object{iobj}.plotaxes]=plot_field(ObjectData,haxes_1,PlotParam,keeplim,PosColorbar);
     2669            elseif ~isempty(view_field_handle)
     2670                view_field_hh=guidata(view_field_handle);
     2671                PlotParam=read_plot_param(view_field_hh);%read plotting parameters on the uvmat interface
     2672                [PlotType,ScalOut,UvData.Object{iobj}.plotaxes]=plot_field(ObjectData,view_field_hh.axes3,PlotParam,keeplim,PosColorbar);
     2673            else
     2674                [pt,so,UvData.Object{iobj}.plotaxes]=view_field(ObjectData);
     2675            end
     2676           
    26642677            if isequal(PlotType,'none')
    26652678                hget_field=findobj(allchild(0),'name','get_field');
Note: See TracChangeset for help on using the changeset viewer.