필터 지우기
필터 지우기

Text in MATLAB plot with negativ coordinates

조회 수: 2 (최근 30일)
Ben
Ben 2013년 7월 3일
Hello
I am trying to plot text into my existing MATLAB plot. The text should be on the left side of my y-axis. However if I use text(-0.075,0.3,'bla'), the text will always intersect with the y axis no matter what value I choose for the y coordiante. I managed to position the text under the x-axis but somehow it just does not work for my y axis.
Maybe there is an issue with the normalized coordinates of the plot?
Note: Same thing happens when i try to move ylabel to the left
  댓글 수: 1
Ben
Ben 2013년 7월 3일
The problem has been resolved. The problem was that I am pretty lame today and i did not realize I am not working with normalized coordinates...

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

답변 (1개)

Chad Gilbert
Chad Gilbert 2013년 7월 3일
It might sound paradoxical, but if you set the horizontalalignment to 'right', instead of the default, 'left', your text should line up nicely. E.g.:
hdl = text(x,y, 'example');
set(hdl,'horizontalalignment','left');

카테고리

Help CenterFile Exchange에서 Data Import and Export에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by