# HG changeset patch # User Rik # Date 1523400367 25200 # Node ID 5251de3c34d7ebe4b2776dfdcf74b4a14d80d596 # Parent ff830f8e61ac800e3b831d6f8f253c93e5f19ec4 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. diff -r ff830f8e61ac -r 5251de3c34d7 scripts/plot/draw/private/__pie__.m --- 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);