Mercurial > octave-nkf
comparison scripts/plot/text.m @ 10549:95c3e38098bf
Untabify .m scripts
author | Rik <code@nomad.inbox5.com> |
---|---|
date | Fri, 23 Apr 2010 11:28:50 -0700 |
parents | 93c65f2a5668 |
children | be55736a0783 |
comparison
equal
deleted
inserted
replaced
10548:479536c5bb10 | 10549:95c3e38098bf |
---|---|
48 | 48 |
49 label = varargin{offset}; | 49 label = varargin{offset}; |
50 if (ischar (label) || iscellstr (label)) | 50 if (ischar (label) || iscellstr (label)) |
51 varargin(1:offset) = []; | 51 varargin(1:offset) = []; |
52 if (ischar (label)) | 52 if (ischar (label)) |
53 label = cellstr (label); | 53 label = cellstr (label); |
54 endif | 54 endif |
55 n = numel (label); | 55 n = numel (label); |
56 nx = numel (x); | 56 nx = numel (x); |
57 ny = numel (y); | 57 ny = numel (y); |
58 nz = numel (z); | 58 nz = numel (z); |
71 if (nx == ny && nx == nz) | 71 if (nx == ny && nx == nz) |
72 pos = [x(:), y(:), z(:)]; | 72 pos = [x(:), y(:), z(:)]; |
73 ca = gca (); | 73 ca = gca (); |
74 tmp = zeros (n, 1); | 74 tmp = zeros (n, 1); |
75 if (n == 1) | 75 if (n == 1) |
76 label = label{1}; | 76 label = label{1}; |
77 for i = 1:nx | 77 for i = 1:nx |
78 tmp(i) = __go_text__ (ca, "string", label, | 78 tmp(i) = __go_text__ (ca, "string", label, |
79 "position", pos(i,:), | 79 "position", pos(i,:), |
80 varargin{:}); | 80 varargin{:}); |
81 endfor | 81 endfor |
82 __request_drawnow__ (); | 82 __request_drawnow__ (); |
83 elseif (n == nx) | 83 elseif (n == nx) |
84 for i = 1:nx | 84 for i = 1:nx |
85 tmp(i) = __go_text__ (ca, "string", label{i}, | 85 tmp(i) = __go_text__ (ca, "string", label{i}, |
86 "position", pos(i,:), | 86 "position", pos(i,:), |
87 varargin{:}); | 87 varargin{:}); |
88 endfor | 88 endfor |
89 __request_drawnow__ (); | 89 __request_drawnow__ (); |
90 else | 90 else |
91 error ("text: dimension mismatch for coordinates and label"); | 91 error ("text: dimension mismatch for coordinates and label"); |
92 endif | 92 endif |
93 else | 93 else |
94 error ("text: dimension mismatch for coordinates"); | 94 error ("text: dimension mismatch for coordinates"); |
95 endif | 95 endif |
96 | 96 |