Changeset 2559


Ignore:
Timestamp:
10/29/09 07:53:03 (15 years ago)
Author:
Mathieu Morlighem
Message:

Added superposition of 2 sectionvalues support in 2d

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/classes/public/plot/plot_section.m

    r2526 r2559  
    3838
    3939%Compute section value
    40 [elements,x,y,z,s,data_s]=SectionValues(md,data,getfieldvalue(options,'sectionvalue'),resolution);
     40if isquiver
     41        [elements,x,y,z,s,data_s1]=SectionValues(md,data(:,1),getfieldvalue(options,'sectionvalue'),resolution);
     42        [elements,x,y,z,s,data_s2]=SectionValues(md,data(:,2),getfieldvalue(options,'sectionvalue'),resolution);
     43else
     44        [elements,x,y,z,s,data_s]=SectionValues(md,data,getfieldvalue(options,'sectionvalue'),resolution);
     45end
    4146
     47%2D
    4248if is2d
    4349
     
    7379        %plot section value
    7480        subplot(width,width,index1)
    75         plot(s,data_s)
     81        if isquiver
     82                [AX,H1,H2]=plotyy(s,data_s1,s,data_s2,'plot');
     83                if exist(options,'Ylabel'),
     84                        Ylabel=getfieldvalue(options,'Ylabel');
     85                        if iscell(Ylabel) & length(Ylabel)==2,
     86                                set(get(AX(1),'Ylabel'),'String',Ylabel{1});
     87                                set(get(AX(2),'Ylabel'),'String',Ylabel{2});
     88                                options=removefield(options,'Ylabel',0);
     89                        end
     90                end
     91        else
     92                plot(s,data_s)
     93        end
    7694
     95%3D
    7796else
    7897        %plot section value
Note: See TracChangeset for help on using the changeset viewer.