Azzera filtri
Azzera filtri

how to set default properties for annotations

1 visualizzazione (ultimi 30 giorni)
Is it possible to set the deafult properties for annotations? Something like set(0,'defaultAnnotationTextInterpreter','latex')?
Regards, Johannes

Risposta accettata

Mike Garrity
Mike Garrity il 3 Mag 2016
The pattern is
  • 'Default'
  • The value of the object's Type property
  • The name of the property you want to set.
So, if we check the Type property of an annotation:
h = annotation('textarrow');
We get:
And if we look for the property, we find that its name is 'Interpreter'. Therefore, we want to do this:
And then we can do this:
annotation('textarrow', ...
'String','$$ \int_{0}^{2} x^2\sin(x) dx $$', ...
And we get this:

Più risposte (1)

Johannes Weidenauer
Johannes Weidenauer il 4 Mag 2016
Modificato: Johannes Weidenauer il 4 Mag 2016
Yes, that's it! I did know the pattern, but I didn't know how to find out the Type property.
Thank you!
(And thanks for showing this with a nice example!)

Community Treasure Hunt

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

Start Hunting!

Translated by