How to prevent line break after blank space when plotting text using annotation textbox?

if I try to plot this:
x = 'The blank spaces break line';
figure(1)
annotation('textbox',[0.178 0.425 0 0],'String',x);
At every blank space the text breaks to a new line. How to prevent that?

 채택된 답변

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 7월 5일
편집: KALYAN ACHARJYA 2019년 7월 5일
x = 'The blank spaces break line';
figure(1)
annotation('textbox',[0.1 0.1 .35 .1],'String',x);
%....................^^ Dimension
I have changed it, its now working, more detail dimention example, check here
Hope it helps!

댓글 수: 2

Oh, so it is because the annotation textbox had no dimensions, so the text was squeezing itself
thank you very much!
Welcome @Conrado

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by