Mercurial > octave
diff scripts/plot/draw/private/__pie__.m @ 25198:5251de3c34d7
Center label if only one value is given for a pie chart.
* __pie__.m: Use HorizontalAlignment value of "center" if there is
only a single value for the entire pie chart.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 10 Apr 2018 15:46:07 -0700 |
parents | 6652d3823428 |
children | 00f796120a6d |
line wrap: on
line diff
--- a/scripts/plot/draw/private/__pie__.m Tue Apr 10 15:43:16 2018 -0700 +++ b/scripts/plot/draw/private/__pie__.m Tue Apr 10 15:46:07 2018 -0700 @@ -131,8 +131,10 @@ elseif (strcmp (caller, "pie")) if (xt > 0) align = "left"; + elseif (xt < 0) + align = "right"; else - align = "right"; + align = "center"; endif hlist = [hlist; patch(xoff + [0, -sind(xn)], yoff + [0, cosd(xn)], i);