# HG changeset patch # User Rik # Date 1578513109 28800 # Node ID 08630aedc41fefa2af28d8e263af847cbc355f4b # Parent 1891570abac8fbb48c84224eb12d15f05e234f77 polar.m: Add small gap between grid and grid labels (bug #57553). * polar.m: Add a small gap (2% of maximum rtick value) between the labels for the circular grid on a polar plot and the line objects themselves. Clarify comment text. diff -r 1891570abac8 -r 08630aedc41f scripts/plot/draw/polar.m --- a/scripts/plot/draw/polar.m Mon Jan 06 22:29:51 2020 -0500 +++ b/scripts/plot/draw/polar.m Wed Jan 08 11:51:49 2020 -0800 @@ -360,25 +360,27 @@ patch (x(:,end), y(:,end), -ones (circle_points, 1), get (hax, "color"), "parent", hg); - ## Plot dotted circles + ## Plot grid circles line (x(:,1:end-1), y(:,1:end-1), lprops{:}, "parent", hg); - ## Outer circle is drawn solid + ## Outer circle (axes "box") is always drawn solid line (x(:,end), y(:,end), lprops{:}, "linestyle", "-", "parent", hg); ## Add radial labels - [x, y] = pol2cart (0.42 * pi, rtick); + ## Labels are arranged along a radius with an angle of 75 degrees. + ## 2% addition puts a small visual gap between grid circle and label. + [x, y] = pol2cart (0.42 * pi, rtick + (.02 * max (rtick(:)))); text (x, y, num2cell (rtick), "verticalalignment", "bottom", tprops{:}, "parent", hg); - ## add radial lines + ## Add radial lines s = rtick(end) * sin (ttick * pi / 180); c = rtick(end) * cos (ttick * pi / 180); x = [zeros(1, numel (ttick)); c]; y = [zeros(1, numel (ttick)); s]; line (x, y, "linestyle", ":", lprops{:}, "parent", hg); - ## add angular labels + ## Add angular labels tticklabel = num2cell (ttick); ## FIXME: This tm factor does not work as fontsize increases tm = 1.08;