Change position of legend and stacking to horizontal

11 ビュー (過去 30 日間)
Yoni Verhaegen
Yoni Verhaegen 2019 年 7 月 6 日
編集済み: John D'Errico 2023 年 4 月 27 日
Hi,
I have this figure with a lot of information and the boxes of the legend are either larger than the box of my graph or overlay my figure curves. Therefore, I was wondering if it is possible to change the position of the legend box to under the graphs, and to change the stacking from vertical to horizontal. In attachment, I upload the figure where I illustratie what I mean.
Thanksfig2.png
  1 件のコメント
John D'Errico
John D'Errico 2023 年 4 月 27 日
編集済み: John D'Errico 2023 年 4 月 27 日
To the person who chose to flag the answer, if you think the answer did not solve your problem, then add a comment to the answer, explaining why this is the case, as opposed to flagging the answer. Flags should be reserved for problems that require moderator attention.
(To be honest, I think you are correct, in that moving a legend within the figure will not help you. However, the legend function cannot be used to put a legend where you wanit it to lie.)

サインインしてコメントする。

回答 (1 件)

KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 7 月 6 日
編集済み: KALYAN ACHARJYA 2019 年 7 月 6 日
Change the position of legend box?
You specifically asking postion of legend box
You can simply drag and drop
Or
Use the approapriate, follows
legend({'leg1','leg2'},'Location','southoutside')
%....................................^^ Its gives you outside legend (lower)
You can specify the number of legend columns using the NumColumns property, check here
oo.png

カテゴリ

Help Center および File ExchangeLegend についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by