7 % RGBcolors :
set boundaries colors
8 % colormap :
set colormap value to \
'Jet\', \'HSV\', \'Gray\', \'colorcube\',\'Cool\',\'Spring\',\'Summer\',...
9 % Legend : set legend visible at true or false
10 % FontSize : set legend font size
11 % LineWidth : set boundaries lines width
15 % PlotBounds(Th,'LineWidth
',2);@endverbatim
16 % \image html images/PlotBounds.png "figure : PlotBounds(Th,\'LineWidth\',2);"
18 p.addRequired('Th
', @isstruct);
20 p.addParamValue('colormap
', 'Jet
', @isstr );
21 p.addParamValue('RGBcolors
', [], @isnumeric );
22 p.addParamValue('LineWidth
', 2.0 , @isnumeric );
23 p.addParamValue('Legend
', true , @islogical );
24 p.addParamValue('FontSize
', 10 , @isnumeric );
26 %p.addParamValue('EdgeNumber
', false , @islogical );
34 cmap=colormap(p.Results.colormap);
40 if (isempty(p.Results.RGBcolors))
41 RGBcolors=RGB(t(randperm(amax)),cmap);
43 RGBcolors=p.Results.RGBcolors;
45 PrevHold=SetHoldOn(true);
50 cLegend=sprintf('%s
''\\Gamma_{%d}
''',cLegend,LB(i));
52 cLegend=sprintf(
'%s''\\Gamma_{%d}'',',cLegend,LB(i));
54 %stringMat=[stringMat ;'\Gamma_',num2str(LB(i))];
55 I=find(Th.bel == LB(i));
56 h(i)=plot([Th.q(1,Th.be(1,I(1))) Th.q(1,Th.be(2,I(1)))], ...
57 [Th.q(2,Th.be(1,I(1))) Th.q(2,Th.be(2,I(1)))]);
58 set(h(i),
'Color',RGBcolors(i,:),
'LineWidth',p.Results.LineWidth);
60 eval(sprintf(
'H=legend(h,%s);',cLegend));
61 set(H,
'FontSize',p.Results.FontSize);
64 % On trace enfin les bords
66 I=find(Th.bel == LB(i));
68 h=plot([Th.q(1,Th.be(1,k)) Th.q(1,Th.be(2,k))], ...
69 [Th.q(2,Th.be(1,k)) Th.q(2,Th.be(2,k))]);
70 set(h,
'Color',RGBcolors(i,:),
'LineWidth',p.Results.LineWidth);