Mercurial > hg > octave-lojdl
changeset 12393:f16a5244d93a release-3-4-x
Delete old legends and fix for legend locations that are 'southest' (followup #32343)
author | David Bateman <dbateman@free.fr> |
---|---|
date | Sun, 06 Feb 2011 15:33:56 +0100 |
parents | 2e74073b5791 |
children | 88e8779f525e |
files | scripts/ChangeLog scripts/plot/legend.m |
diffstat | 2 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2011-02-06 David Bateman <dbateman@free.fr> + * plot/legend.m : Delete old legend before probing the position and + outerposition. Reshape lpos correct if the legend locqtion is + "southeast". + 2011-02-06 Ben Abbott <bpabbott@mac.com> * plot/legend.m: Add demo for replacing existing legend.
--- a/scripts/plot/legend.m +++ b/scripts/plot/legend.m @@ -410,6 +410,9 @@ endif box = get (hlegend, "box"); fkids = get (fig, "children"); + + delete (hlegend); + hlegend = []; else if (strcmp (textpos, "default")) textpos = "left"; @@ -612,7 +615,7 @@ endif case "southeast" if (outside) - lpos = [ca_outpos(1) + ca_outpos(3) - lpos(3), ca_outpos(2), + lpos = [ca_outpos(1) + ca_outpos(3) - lpos(3), ca_outpos(2), ... lpos(3), lpos(4)]; new_pos = [ca_pos(1), ca_pos(2) + lpos(4), ... ca_pos(3) - lpos(3), ca_pos(4) - lpos(4)];