Defining font size in legend does not work

5 Ansichten (letzte 30 Tage)
dcydhb dcydhb
dcydhb dcydhb am 19 Jun. 2019
Beantwortet: Bjorn Gustavsson am 19 Jun. 2019
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?

Antworten (1)

Bjorn Gustavsson
Bjorn Gustavsson am 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

Produkte


Version

R2014a

Community Treasure Hunt

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

Start Hunting!

Translated by