Skip to content

Commit b494ff6

Browse files
committed
fix an issue with gridmaps legend following discussion #127
1 parent d4e5e0c commit b494ff6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

CODE/matlab/superprocs/gridmaps.m

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function gridmaps(grids,outd,varargin)
4040
%
4141
% Author: F. Beauducel, C. Brunet, WEBOBS/IPGP
4242
% Created: 2013-09-13 in Paris, France
43-
% Updated: 2022-07-21
43+
% Updated: 2023-01-13
4444

4545

4646
WO = readcfg;
@@ -401,9 +401,10 @@ function gridmaps(grids,outd,varargin)
401401
if ~isempty(k0)
402402
target(xl(3),yl,nodesize,nodecolor,nodetype,2);
403403
end
404+
nm = length(kam) + length(k0m);
404405
text(xl,yl*[1,1,1],{sprintf('{\\bf%s}',nodename), ...
405-
sprintf(' active ({\\bf%d}/%d)',length(kam),length(kn)), ...
406-
repmat(sprintf(' inactive ({\\bf%d}/%d)',length(k0m),length(kn)),~isempty(k0m))}, ...
406+
sprintf(' active ({\\bf%d}/%d)',length(kam),nm), ...
407+
repmat(sprintf(' inactive ({\\bf%d}/%d)',length(k0m),nm),~isempty(k0m))}, ...
407408
'FontSize',14,'HorizontalAlignment','left')
408409
end
409410

0 commit comments

Comments
 (0)