source: issm/oecreview/Archive/26740-27031/ISSM-26969-26970.diff@ 27032

Last change on this file since 27032 was 27032, checked in by Mathieu Morlighem, 3 years ago

CHG: added 26740-27031

File size: 1.5 KB
  • TabularUnified ../trunk-jpl/src/m/plot/plot_vertexnumbering.m

     
    1919        patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','none','EdgeColor','black');
    2020
    2121        %numbering
    22         text(x,y,z,num2str(vertexnumbers),...
    23                 'backgroundcolor',[0.8 0.9 0.8],'HorizontalAlignment','center','VerticalAlignment','middle');
     22        X   = x;
     23        Y   = y;
     24        NUM = vertexnumbers;
     25        if exist(options,'axis')
     26                AXIS = getfieldvalue(options,'axis');
     27                pos = find(X>AXIS(1) & X<AXIS(2) & Y>AXIS(3) & Y<AXIS(4));
     28                X = X(pos); Y=Y(pos); NUM=NUM(pos);
     29        end
     30        text(X,Y,num2str(NUM),'backgroundcolor',[0.8 0.9 0.8],'HorizontalAlignment','center','VerticalAlignment','middle');
    2431
    2532        %Highlight
    2633        pos=getfieldvalue(options,'highlight',[]);
     
    4451        end
    4552
    4653        %numbering
    47         text(x,y,z,num2str(vertexnumbers),...
    48                 'backgroundcolor',[0.8 0.9 0.8],'HorizontalAlignment','center','VerticalAlignment','middle');
     54        X   = x;
     55        Y   = y;
     56        Z   = z;
     57        NUM = vertexnumbers;
     58        if exist(options,'axis')
     59                AXIS = getfieldvalue(options,'axis');
     60                pos = find(X>AXIS(1) & X<AXIS(2) & Y>AXIS(3) & Y<AXIS(4));
     61                X = X(pos); Y=Y(pos); Z=Z(pos); NUM=NUM(pos);
     62        end
     63        text(X,Y,Z,num2str(NUM),'backgroundcolor',[0.8 0.9 0.8],'HorizontalAlignment','center','VerticalAlignment','middle');
    4964
    5065        %Highlight
    5166        pos=getfieldvalue(options,'highlight',[]);
Note: See TracBrowser for help on using the repository browser.