Why do I get the error "Unable to set the 'YAxis' property of class UIAxes because it is read-only" when I programmatically assign a new y-axis ruler in MATLAB R2024a?
Afficher commentaires plus anciens
I have been programmatically changing the type of axis by assigning a new ruler of the correct type. For example, for the y-axis:
a = uiaxes;
a.YAxis = matlab.graphics.axis.decorator.DurationRuler;
I then get the following error:
Unable to set the 'YAxis' property of class UIAxes because it is read-only.
However, I do not receive any error when I do this with the x-axis.
Is this a bug? Why is the behaviour between programmatically assigning a new ruler different for the y-axis and the x-axis? What are the workarounds for this error?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Data Exploration dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!