Changeset 26970


Ignore:
Timestamp:
04/25/22 11:57:58 (3 years ago)
Author:
Mathieu Morlighem
Message:

CHG: take into account 'axis' to speed up plot

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified issm/trunk-jpl/src/m/plot/plot_vertexnumbering.m

    r17717 r26970  
    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
     
    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
Note: See TracChangeset for help on using the changeset viewer.