| MESH toolbox 0.1 Matlab/Octave mesh utils

- Main Page
- Related Pages
- Modules
- Files

- File List
- File Members

All Files Functions Groups Pages
PlotMeshNodeNumber.m
Go to the documentation of this file.
1 function PlotMeshNodeNumber(varargin)
2 % PlotMeshNodeNumber(varargin)
3 % Write mesh node numbers on figure
4 %
5 % parameters:
6 % Th : mesh structure
7 % BackgroundColor : set node numbers background box colors
8 % Color : set node numbers colors
9 % FontSize : set node numbers font size
10 %
11 % Example:
12 % @verbatim
13 % PlotMeshNodeNumber(Th,'Color',[1 0 0]);@endverbatim
14 % \image html images/PlotBounds.png "figure : PlotBounds(Th,\'LineWidth\',2);"
15 %
16 % See also:
17 %
18 p = inputParser;
19 p.addRequired('Th', @isstruct);
20 %
21 p.addParamValue('BackgroundColor', [1 1 1], @isnumeric );
22 p.addParamValue('FontSize', 10, @isnumeric );
23 p.addParamValue('Color', [0 0 0] , @isnumeric );
24 p.parse(varargin{:});
25
26 q=p.Results.Th.q;
27 nq=p.Results.Th.nq;
28 PrevHold=SetHoldOn(true);
29 text(q(1,:),q(2,:),num2str([1:nq]'), ...
30 'BackgroundColor',p.Results.BackgroundColor, ...
31 'Color',p.Results.Color, ...
32 'FontSize',p.Results.FontSize, ...
33 'HorizontalAlignment','center');
34 RestoreHold(PrevHold)