legend and dbplot

52 views
Skip to first unread message

ripatti

unread,
Nov 7, 2011, 9:22:36 AM11/7/11
to iris-toolbox-discussion
Dear Musketeers,

I have an extensive amount of (fairly general purpose) code that
compares two sets of impulse responses utilizing dbase structures and |
dbplot|. |dbplot| nicely accepts all the options of qplot, including
'subplots' option. If I add legend command, I get legend to the last/
first figures of resulting set of figures. Ideally, I would like to
get legend once in each figure that 'subplot' option produces. I have
run out of coding ideas. Any clue? Legend is related to axes and
s.legend.Location = 'Best';
s.legend.String = {'this','that'};
qstyle...
does not do what I want.

Cheers,

Antti

Jaromir Benes

unread,
Nov 7, 2011, 9:53:34 AM11/7/11
to iris-t...@googlegroups.com
Antti,

if the legend is the same in each figure (and you want one legend per figure, not one legend per graph=axes object), you can do the following

ff = dbplot(...);

for i = ff
    figure(i);
    legend(...);
end

Is this what you want?

Cheers,
Mirek

ripatti

unread,
Nov 7, 2011, 10:34:23 AM11/7/11
to iris-toolbox-discussion
Thanks again Mirek! This does exactly what I wanted. Working alone
results sometimes very complicated code (I tried bookkeeping of axes
and stuff...)
Antti
Reply all
Reply to author
Forward
0 new messages