Mercurial > octave
changeset 22353:788f554ac87d
clabel.m: Fix computation of label rotation (bug #48814).
* __clabel__.m: use absolute coordinates to compute the label rotation angle.
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Thu, 18 Aug 2016 23:59:00 +0200 |
parents | d71ae2cd510b |
children | 0b2edd6408be |
files | scripts/plot/appearance/__clabel__.m |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/appearance/__clabel__.m Sun Aug 21 18:08:47 2016 -0700 +++ b/scripts/plot/appearance/__clabel__.m Thu Aug 18 23:59:00 2016 +0200 @@ -101,8 +101,8 @@ 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)), - diff (c(1,i+j-1:i+j))); + trot = 180 / pi * atan2 (diff (c(2,i+j-1:i+j)) * yspacing, + diff (c(1,i+j-1:i+j)) * xspacing); if (abs (trot) > 90) trot += 180; endif