Defining font size in legend does not work

6 views (last 30 days)
i define the font size of the legend in this way,it doesn't work
size=15;
legend1=legend(',,,',',,,','FontSize',size))
but it works in this way
size=15;
legend1=legend(',,,',',,,')
set(legend1,'FontSize',size)
why?

Answers (1)

Bjorn Gustavsson
Bjorn Gustavsson on 19 Jun 2019
>> why
The bald and not excessively bald and not excessively smart hamster obeyed a terrified and not excessively terrified hamster.
I hoped that I would get one of the old outputs from why, one of the type: "Because Steve said so"...
If you read the documentation it seems as if legend is only expecting additional settings for location and orientation
and nothing else. If you store the first output from legend you get a handle to the legend axes and for that you have access to all its properties by way of set/get.
HTH

Tags

Products


Release

R2014a

Community Treasure Hunt

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

Start Hunting!