How to move a lengend to the front with subplots

16 Ansichten (letzte 30 Tage)
Al
Al am 16 Aug. 2015
Kommentiert: Zong-Jhen Ye am 11 Mai 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 Kommentare
Al
Al am 16 Aug. 2015
Bearbeitet: Al am 16 Aug. 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 am 11 Mai 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')

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by