how to set default properties for annotations

3 ビュー (過去 30 日間)
Johannes Weidenauer
Johannes Weidenauer 2016 年 5 月 3 日
編集済み: Johannes Weidenauer 2016 年 5 月 4 日
Is it possible to set the deafult properties for annotations? Something like set(0,'defaultAnnotationTextInterpreter','latex')?
Regards, Johannes

採用された回答

Mike Garrity
Mike Garrity 2016 年 5 月 3 日
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');
h.Type
We get:
textarrowshape
And if we look for the property, we find that its name is 'Interpreter'. Therefore, we want to do this:
set(groot,'DefaultTextarrowshapeInterpreter','latex')
And then we can do this:
annotation('textarrow', ...
'String','$$ \int_{0}^{2} x^2\sin(x) dx $$', ...
'FontSize',12)
And we get this:

その他の回答 (1 件)

Johannes Weidenauer
Johannes Weidenauer 2016 年 5 月 4 日
編集済み: Johannes Weidenauer 2016 年 5 月 4 日
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!)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by