numColumns Property in legend

I've got the need to arrange my legend into two columns. Luckily, I found matlab has the built-in method to do it.
However, as the image shows, even the example given by MATLAB does not work here. No matter I use the paired value set as legend({}, 'NumColumns', 2) or I use the dot notation as lgd = legend({}), and then lgd.NumColumns = 2.
I wonder what's the matter. Is this properties cut in recent version or is there something wrong?
Thanks a lot

3 件のコメント

dpb
dpb 2018 年 3 月 23 日
Doc doesn't indicate which release was introduced with; it's not in R2016b here; which release are you on?
Linda de Man
Linda de Man 2018 年 3 月 25 日
i`m on R2017b version and it doesn`t work
Star Strider
Star Strider 2018 年 3 月 25 日
It’s new in R2018a.
See Release Notes (link) under Graphics. Specifically: Add Legend to Graph (link).

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

回答 (1 件)

Rik
Rik 2018 年 3 月 25 日

1 投票

For those not on R2018a, there is a FEX submission that should provide the same functionality: columnlegend

1 件のコメント

Golan Bel
Golan Bel 2018 年 10 月 24 日
It does not provide the same functionality as it does not allow to set the font properties nor many other tweaks.

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

カテゴリ

質問済み:

2018 年 3 月 23 日

コメント済み:

2018 年 10 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by