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
RevLine 
[27032]1Index: ../trunk-jpl/src/m/plot/plot_vertexnumbering.m
2===================================================================
3--- ../trunk-jpl/src/m/plot/plot_vertexnumbering.m (revision 26969)
4+++ ../trunk-jpl/src/m/plot/plot_vertexnumbering.m (revision 26970)
5@@ -19,8 +19,15 @@
6 patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','none','EdgeColor','black');
7
8 %numbering
9- text(x,y,z,num2str(vertexnumbers),...
10- 'backgroundcolor',[0.8 0.9 0.8],'HorizontalAlignment','center','VerticalAlignment','middle');
11+ X = x;
12+ Y = y;
13+ NUM = vertexnumbers;
14+ if exist(options,'axis')
15+ AXIS = getfieldvalue(options,'axis');
16+ pos = find(X>AXIS(1) & X<AXIS(2) & Y>AXIS(3) & Y<AXIS(4));
17+ X = X(pos); Y=Y(pos); NUM=NUM(pos);
18+ end
19+ text(X,Y,num2str(NUM),'backgroundcolor',[0.8 0.9 0.8],'HorizontalAlignment','center','VerticalAlignment','middle');
20
21 %Highlight
22 pos=getfieldvalue(options,'highlight',[]);
23@@ -44,8 +51,16 @@
24 end
25
26 %numbering
27- text(x,y,z,num2str(vertexnumbers),...
28- 'backgroundcolor',[0.8 0.9 0.8],'HorizontalAlignment','center','VerticalAlignment','middle');
29+ X = x;
30+ Y = y;
31+ Z = z;
32+ NUM = vertexnumbers;
33+ if exist(options,'axis')
34+ AXIS = getfieldvalue(options,'axis');
35+ pos = find(X>AXIS(1) & X<AXIS(2) & Y>AXIS(3) & Y<AXIS(4));
36+ X = X(pos); Y=Y(pos); Z=Z(pos); NUM=NUM(pos);
37+ end
38+ text(X,Y,Z,num2str(NUM),'backgroundcolor',[0.8 0.9 0.8],'HorizontalAlignment','center','VerticalAlignment','middle');
39
40 %Highlight
41 pos=getfieldvalue(options,'highlight',[]);
Note: See TracBrowser for help on using the repository browser.