On 10/16/2013 10:00 AM, address@hidden wrote:
7) In the list of children associated with a figure, I'm trying to
determine which is an axes and which is a legend. Try the following
commands:
figure(10)
x = [1:50]
h = plot(x)
legend(h, 'this is x');
kids = get(gcf, 'Children')
get(kids(1))
[snip]
tag = legend
type = axes
[snip]
get(kids(2))
[snip]
tag =
type = axes
[snip]
It's as though the "tag" for the legend actually should be the "type"
variable value. There shouldn't be a tag there unless the user
specifies one. This may have been introduced somewhere around the
following changeset:
http://hg.savannah.gnu.org/hgweb/octave/rev/d99785217634
Blame The MathWorks. Legends are implemented as an additional axes on the
figure with the tag set to "legend". This is the compatible behavior.