3 % code
using basic mesh plot command.
6 % save :
set to
true to save figures in image directory.
7 % percent :
set color mesh lines
8 % meshfile :
set mesh file name
11 % @verbatim
graphic_demo1(
'save',
true,
'percent',30)
@endverbatim
12 % \image html images/
PlotMesh.png
"figure(1) : PlotMesh(Th,\'Color\',[1 0 0],\'LineWidth\',1);"
13 % \image html images/
PlotBounds.png
"figure(2) : PlotBounds(Th,\'LineWidth\',2);"
14 % \image html images/PlotBoundsAndMesh.png
"figure(3) : PlotMesh and PlotBounds"
15 % \image html images/
PlotVal.png
"figure(4) : PlotVal(Th,u,\'colormap\',\'Cool\');"
21 p.addParamValue(
'save',
false, @islogical );
22 p.addParamValue(
'percent', 50 , @(t) ((t>0)&&(t<=100)) );
23 p.addParamValue(
'meshfile',[
'mesh',filesep,
'disque4-1-10.msh'], @isstr );
33 PlotMesh(Th,'Color',[1 0 0],'LineWidth',1);
34 SaveImage(p.Results.save,'
PlotMesh',p.Results.percent)
35 title(['Filename : ',p.Results.meshfile])
40 SaveImage(p.Results.save,'
PlotBounds',p.Results.percent)
41 title('Representation des frontieres du domaine')
44 PlotMesh(Th,'Color',[0 0 0]);
45 PlotBounds(Th,'colormap','spring','LineWidth',2,'RGBcolors',RGBcolors);
46 SaveImage(p.Results.save,'PlotBoundsAndMesh',p.Results.percent)
47 title('Representation du domaine et de ses frontieres')
50 % Representation d'une <fonction> sur un maillage
51 x=Th.q(1,:);y=Th.q(2,:);
56 PlotVal(Th,u,'colormap','Cool');
57 SaveImage(p.Results.save,'
PlotVal',p.Results.percent)
59 title('Representation de la fonction cos(pi*(x*x+y*y))')
63 [colors,values]=
PlotIso(Th.q,Th.me,Th.be,u,15);
64 colorbarIso(colors,values)
66 title('Iso valeurs de la fonction cos(pi*(x*x+y*y))')
70 trisurf(Th.me',Th.q(1,:),Th.q(2,:),u)