My annotation of Greek letters fails with capital letters and without them. Any answer?

5 ビュー (過去 30 日間)
>> Tbox=annotation('textbox',[.13,.39,.17,.085],'String','\alpha \beta \gamma \Gamma',...
' \delta \Delta \epsilon \zeta \eta \theta \Theta \iota \kappa \lambda \Lambda',...
' \mu \nu \xi \pi \Pi \rho \sigma \Sigma \tau \upsilon \Upsilon \phi \Phi \chi',...
' \psi \Psi \omega \Omega','BackgroundColor',[.5,.5,1])
Error using matlab.graphics.shape.TextBox/set
Invalid parameter/value pair arguments.
Error in matlab.graphics.chart.internal.ctorHelper (line 6)
set(obj, pvpairs{:});
Error in matlab.graphics.shape.TextBox
Error in annotation (line 140)
h = matlab.graphics.shape.TextBox(aargs{:});

採用された回答

Image Analyst
Image Analyst 2016 年 7 月 3 日
You can't split a string over multiple lines. A quoted string literal must be all on one line. Try this:
Tbox=annotation('textbox', 'Position', [.13,.39,.17,.085],'String','\alpha \beta \gamma \Gamma \delta \Delta \epsilon \zeta \eta \theta \Theta \iota \kappa \lambda \Lambda \mu \nu \xi \pi \Pi \rho \sigma \Sigma \tau \upsilon \Upsilon \phi \Phi \chi \psi \Psi \omega \Omega',...
'BackgroundColor',[.5,.5,1])
  1 件のコメント
Kenneth Lamury
Kenneth Lamury 2016 年 7 月 3 日
編集済み: Walter Roberson 2016 年 7 月 3 日
Using for example
Tbox=annotation('textbox', 'Position', [.13,.39,.17,.085],...
'String',...
'$$\alpha \beta \gamma \Gamma $$',...
,'interpreter','latex')
and doing this in several Tbox annotations gives desired results. Thanks!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLabels and Annotations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by