How to set default legend properties in R2017a?
Show older comments
I have seen solutions to this question that seem to no longer apply for R2017a.
The 'Legend' Illustration Object has a 'AutoUpdate' Text Property that is breaking all the plot routines that I have written over the years. I would very much like to set the default to 'off'.
The following does not work:
>> set(groot,'LegendAutoUpdate','off')
Error using matlab.ui.Root/set
There is no LegendAutoUpdate property on the Root class.
>> set(groot,'factoryLegendAutoUpdate','off')
Error using matlab.ui.Root/set
Factory properties can only be queried, not set.
>> set(0,'LegendAutoUpdate','off')
Error using set
There is no LegendAutoUpdate property on the Root class.
I don't want to wait until I instantiate and have a Legend handle.
I want to change the default.
6 Comments
David Christhilf
on 29 Aug 2017
David Christhilf
on 29 Aug 2017
Walter Roberson
on 29 Aug 2017
It is not possible to permanently change default properties; startup script is about the closest you can get.
I do not know why it would not work in a startup script through -- unless perhaps you have multiple startup scripts ?
David Christhilf
on 29 Aug 2017
The earlier solution works for me: if I execute the following line at either the command line or in my startup.m file,
set(0,'DefaultLegendAutoUpdate','off')
then I don't get 'data1', 'data2' entries for the code in my question here. I will add that I am running R2018b.
Answers (0)
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!