Mercurial > hg > octave-nkf
changeset 17560:225ec9a0222a
legend.m: Use axis that legend refers to when calculating color for surface patch label.
* scripts/plot/legend.m: Use axis that legend refers to when calculating color
for surface patch label.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 03 Oct 2013 16:48:19 -0700 |
parents | 636330292685 |
children | b41860a0bc24 |
files | scripts/plot/legend.m |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/legend.m +++ b/scripts/plot/legend.m @@ -880,11 +880,12 @@ "cdata", cdata, "userdata", hplots(k)); hobjects(end+1) = p1; endif + ## FIXME: Probably need listeners, as for line objects case "surface" facecolor = get (hplots(k), "facecolor"); edgecolor = get (hplots(k), "edgecolor"); - cdata = sum (caxis ()) / 2; + cdata = sum (get (ca(1), "clim")) / 2; if (! strcmp (facecolor, "none") || ! strcmp (edgecolor, "none")) p1 = patch ("xdata", ([0, linelength, linelength, 0] + xoffset + xk * xstep) / lpos(3), @@ -894,6 +895,7 @@ "cdata", cdata, "userdata", hplots(k)); hobjects(end+1) = p1; endif + ## FIXME: Probably need listeners, as for line objects endswitch