How to move a lengend to the front with subplots

11 visualizzazioni (ultimi 30 giorni)
Al
Al il 16 Ago 2015
Commentato: Zong-Jhen Ye il 11 Mag 2022
Hi have a figure with two subplots. The data for the legend comes from the top subplot. There is some empty space on the bottom subplot. When I drag the legend to the bottom subplot is disappears behind the plot.
I tried
I=legend({'$100 \hspace mm^{2}$'},'Location','southwest')
set(I, 'Interpreter', 'latex','Visible', 'on')
uistack(I,'up',200)
no joy
  3 Commenti
Al
Al il 16 Ago 2015
Modificato: Al il 16 Ago 2015
Thanks. I tried
uistack(I,'top')
however the legend is still behind the lower sub plot. I am using 2015a.
Zong-Jhen Ye
Zong-Jhen Ye il 11 Mag 2022
Hi, I have the same problem and I use the following method to solve it:
figure()
subplot(2,2,2)...
subplot(2,2,3)...
subplot(2,2,4)...
subplot(2,1,1)...
legend('Put what you want here')

Accedi per commentare.

Risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by