[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Subplot and Legend
From: |
Ismael Núñez-Riboni |
Subject: |
Re: Subplot and Legend |
Date: |
Wed, 18 Apr 2012 13:02:49 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 |
I have been trying to make one legend for a set of subplots.
The function legend creates a legend hose position is fixed to the
current axes. Therefore I tried creating an additional axis that cover
the whole figure and add the subplots inside.
It doesn't work cause the legend's contents are also connected to the axes.
I unterstand you want a single legend for various subplots. You can
start by choosing in which subplot you want the legend to be with a
simple "if statement":
subplot(N,R,k)
if k == thisone
legend(...)
end
Is there anyway to move freely the legend inside the figure
(independent of the axis created by subplot)?
So far I know, like in the matlab plots and with the mouse: no.
Is it possible to resize the box containing the legend? (in case
'otientation' 'horizontal' and subplots, the legend can use several
lines, which in a whole figure context wouldn't be necessary)
You can give the orientation and location of the legend. Did you check
already: "help legend"? :-) I think what you want is the option "outside"...
Saludos y Gruesse, Ismael.