Mercurial > octave
changeset 27939:12edd3774db6
annotation.m: For textarrow, space text 2 points away from the line (bug #57553).
* annotation.m (textposition): Add a +/-2 points offset to the text position.
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Fri, 10 Jan 2020 16:21:20 +0100 |
parents | b4a76e7dac6b |
children | d9e325dbd5d3 |
files | scripts/plot/appearance/annotation.m |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/appearance/annotation.m Tue Jan 14 22:18:06 2020 +0100 +++ b/scripts/plot/appearance/annotation.m Fri Jan 10 16:21:20 2020 +0100 @@ -1161,11 +1161,12 @@ pt = rem (pt, 8); endif - ## Compute the text actual "position" property + ## Compute the actual text "position" property and move the text object + ## 2 points away from the arrow. dx = ext(3)/2; dy = ext(4)/2; - XY = [-dx -dx 0 dx dx dx 0 -dx; - 0 -dy -dy -dy 0 dy dy dy]; + XY = [-dx-2, -dx-2, 0, dx+2, dx+2, dx+2, 0, -dx-2; + 0, -dy-2, -dy-2, -dy-2, 0, dy+2, dy+2, dy+2]; switch (get (hte, "horizontalalignment")) case "left"