Greek Letter and Variable Name on one line as Xlabel

1 回表示 (過去 30 日間)
Matthew Zelko
Matthew Zelko 2016 年 1 月 3 日
コメント済み: Star Strider 2016 年 1 月 4 日
Hi all,
This one has me a little stumped.
I have the following code as the Xlabel, but the output as the figure persists on two lines, no matter the size.
xlabel(hs.ax2, ['${\Delta}$' Box1Labels1Cell(1)],'interpreter','latex', 'FontSize', 8);
Anyone able to put me in the right direction?
Thanks,
Matt

回答 (1 件)

Star Strider
Star Strider 2016 年 1 月 3 日
The ‘$’ begins and terminates the string in this instance, so you need to put it at the end of the concatenated string:
['${\Delta} ', Box1Labels1Cell{1}, '$']
and you may have to use curly braces ‘{}’ to do the cell element addressing. (Both changed here.)
  2 件のコメント
Matthew Zelko
Matthew Zelko 2016 年 1 月 4 日
Ahh right, some unfamiliar conventions there. Excellent work Star Strider, thank you very much!
Star Strider
Star Strider 2016 年 1 月 4 日
My pleasure!
If my Answer solved your problem, please Accept it.

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

カテゴリ

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