How to move a lengend to the front with subplots

12 visualizaciones (últimos 30 días)
Al
Al el 16 de Ag. de 2015
Comentada: Zong-Jhen Ye el 11 de Mayo de 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 comentarios
Al
Al el 16 de Ag. de 2015
Editada: Al el 16 de Ag. de 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 el 11 de Mayo de 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')

Iniciar sesión para comentar.

Respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by