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 CenterFile Exchange에서 Labels and Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by