numColumns Property in legend

41 Ansichten (letzte 30 Tage)
Roy Liao
Roy Liao am 23 Mär. 2018
Kommentiert: Golan Bel am 24 Okt. 2018
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 Kommentare
Linda de Man
Linda de Man am 25 Mär. 2018
i`m on R2017b version and it doesn`t work
Star Strider
Star Strider am 25 Mär. 2018
It’s new in R2018a.
See Release Notes (link) under Graphics. Specifically: Add Legend to Graph (link).

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Rik
Rik am 25 Mär. 2018
For those not on R2018a, there is a FEX submission that should provide the same functionality: columnlegend
  1 Kommentar
Golan Bel
Golan Bel am 24 Okt. 2018
It does not provide the same functionality as it does not allow to set the font properties nor many other tweaks.

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by