3 % Write mesh boundaries edges numbers
7 % RGBTextColors :
set boundaries edges numbers colors
8 % RGBEdgeColors :
set boundaries box edges colors
9 % BackgroundColor :
set boundaries edges numbers background box colors
10 % FontSize :
set boundaries edges numbers font size
11 % FontWeight :
set boundaries edges numbers font weight to
'normal',
'bold',
'light' or
'demi'
12 % EdgeColor :
set boundaries edges numbers box edge color
13 % LineStyle :
set line style to
'none',
'-',
'--',
'.' or
'-.'
14 % LineWidth :
set line width
20 %
PlotBoundsEdgeNumber(Th,
'RGBEdgeColors',RGBcolors,
'Color',[0 0 0],
'LineStyle',
'-',
'LineWidth',0.5);
@endverbatim
21 % \image html images/PlotBoundsEdgeNumber1.png
"figure : PlotBoundsEdgeNumber(Th,...);"
25 %
PlotBoundsEdgeNumber(Th,
'RGBEdgeColors',RGBcolors,
'Color',[0 0 0],
'LineStyle',
'-',
'LineWidth',0.5);
@endverbatim
26 % \image html images/PlotBoundsEdgeNumber2.png
"figure : PlotBoundsEdgeNumber(Th,...);"
28 p.addRequired(
'Th', @isstruct);
30 p.addParamValue(
'RGBTextColors', [], @isnumeric );
31 p.addParamValue(
'RGBEdgeColors', [], @isnumeric );
32 p.addParamValue(
'BackgroundColor', [1 1 1] , @isnumeric );
33 p.addParamValue(
'FontSize', 10, @isnumeric );
34 p.addParamValue(
'FontWeight',
'normal', @isstr );
35 p.addParamValue(
'Color', [0 0 0] , @isnumeric );
36 p.addParamValue(
'EdgeColor', [0 0 0] , @isnumeric );
37 p.addParamValue(
'LineWidth', 0.5 , @isnumeric );
38 p.addParamValue(
'LineStyle',
'none' , @isstr );
48 if (isempty(p.Results.RGBTextColors))
49 RGBTextColors=ones(amax,1)*p.Results.Color;
51 RGBTextColors=p.Results.RGBTextColors;
53 if (isempty(p.Results.RGBEdgeColors))
54 RGBEdgeColors=ones(amax,1)*p.Results.EdgeColor;
56 RGBEdgeColors=p.Results.RGBEdgeColors;
60 PrevHold=SetHoldOn(
true);
62 I=find(Th.bel == LB(i));
63 qa=(Th.q(:,Th.be(1,I))+Th.q(:,Th.be(2,I)))/2;
64 text(qa(1,:),qa(2,:),num2str(I
'),'BackgroundColor
',p.Results.BackgroundColor, ...
65 'Color
',RGBTextColors(i,:), ...
66 'FontSize
',p.Results.FontSize, ...
67 'LineWidth
',p.Results.LineWidth, ...
68 'LineStyle
',p.Results.LineStyle, ...
69 'EdgeColor
',RGBEdgeColors(i,:), ...
70 'FontWeight
',p.Results.FontWeight, ...
71 'HorizontalAlignment
','center
');
73 % qa=(Th.q(:,Th.be(1,k))+Th.q(:,Th.be(2,k)))/2;
74 % text(qa(1),qa(2),num2str(k),'BackgroundColor
',p.Results.BackgroundColor, ...
75 % 'Color
',RGBTextColors(i,:), ...
76 % 'FontSize
',p.Results.FontSize, ...
77 % 'LineWidth
',p.Results.LineWidth, ...
78 % 'LineStyle
',p.Results.LineStyle, ...
79 % 'EdgeColor
',RGBEdgeColors(i,:), ...
80 % 'HorizontalAlignment
','center
');