Mercurial > octave
changeset 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 | 6408e371355b |
children | 5af91eaa0034 |
files | scripts/plot/appearance/__clabel__.m |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/appearance/__clabel__.m Sat Oct 15 18:46:55 2022 +0200 +++ b/scripts/plot/appearance/__clabel__.m Mon Oct 17 06:18:14 2022 -0400 @@ -103,12 +103,12 @@ if (isempty (j)) j = clen; endif - tpos = sum (c(:,i+j-1:i+j), 2) / 2; + tpos = sum (c(:,i+j:i+j+1), 2) / 2; if ( tpos(1) != xmin && tpos(1) != xmax && tpos(2) != ymin && tpos(2) != ymax) - trot = 180 / pi * atan2 (diff (c(2,i+j-1:i+j)) * yspacing, - diff (c(1,i+j-1:i+j)) * xspacing); + trot = 180 / pi * atan2 (diff (c(2,i+j:i+j+1)) * yspacing, + diff (c(1,i+j:i+j+1)) * xspacing); if (abs (trot) > 90) trot += 180; endif