MATLAB Answers

How do I make the legend color rectangles smaller?

6 ビュー (過去 30 日間)
Jesús Gutiérrez
Jesús Gutiérrez 2021 年 5 月 20 日
コメント済み: Jesús Gutiérrez 2021 年 5 月 20 日
In barplots legends I find too wide the boxes that show each color. I want they to be more like squares so I can have a narrower legend and save space. Is there any way to do it?

回答 (1 件)

Girijashankar Sahoo
Girijashankar Sahoo 2021 年 5 月 20 日
legend({'A','B'},'Position',[0.2 0.6 0.1 0.2])
%% four-element vector of the form [left bottom width height]
  1 件のコメント
Jesús Gutiérrez
Jesús Gutiérrez 2021 年 5 月 20 日
Thanks, but that didn't help. Outside box is already at it's minimum size. What I want to do is to make the color rectangles narrower, that way the outside box width could be reduced. I don't know if its possible.

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

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by