Mercurial > octave
comparison scripts/plot/appearance/__clabel__.m @ 31314:909770674508
__clabel__.m: Do not print erroneous labels (bug #63213)
author | Tommi Höynälänmaa <tommi.hoynalanmaa@iki.fi> |
---|---|
date | Mon, 17 Oct 2022 06:18:14 -0400 |
parents | 796f54d4ddbf |
children | 597f3ee61a48 |
comparison
equal
deleted
inserted
replaced
31311:6408e371355b | 31314:909770674508 |
---|---|
101 | 101 |
102 j = find (cumd > tagpos, 1); | 102 j = find (cumd > tagpos, 1); |
103 if (isempty (j)) | 103 if (isempty (j)) |
104 j = clen; | 104 j = clen; |
105 endif | 105 endif |
106 tpos = sum (c(:,i+j-1:i+j), 2) / 2; | 106 tpos = sum (c(:,i+j:i+j+1), 2) / 2; |
107 | 107 |
108 if ( tpos(1) != xmin && tpos(1) != xmax | 108 if ( tpos(1) != xmin && tpos(1) != xmax |
109 && tpos(2) != ymin && tpos(2) != ymax) | 109 && tpos(2) != ymin && tpos(2) != ymax) |
110 trot = 180 / pi * atan2 (diff (c(2,i+j-1:i+j)) * yspacing, | 110 trot = 180 / pi * atan2 (diff (c(2,i+j:i+j+1)) * yspacing, |
111 diff (c(1,i+j-1:i+j)) * xspacing); | 111 diff (c(1,i+j:i+j+1)) * xspacing); |
112 if (abs (trot) > 90) | 112 if (abs (trot) > 90) |
113 trot += 180; | 113 trot += 180; |
114 endif | 114 endif |
115 | 115 |
116 if (ischar (z)) | 116 if (ischar (z)) |