text position with plotyy

조회 수: 2 (최근 30일)
Alessandro
Alessandro 2014년 4월 23일
편집: Youcef Yahiaoui 2015년 11월 2일
Hi, I'm using a plotyy with 2 curves that have different order of value (i.e. left axis from 200 to 300 and right axis from 1.5 to 2) and I want to add a LeftArrow and a RightArrow to the two lines. I'm trying to use text function but property of position refers to the first of the two y axis. So I want to refer my text position to the second one. How can I do? Thanks.

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2014년 4월 23일
x=0:0.1:10
y1=20*sin(x);
y2=100*cos(x);
[ax,h1,h2]=plotyy(x,y1,x,y2)
text( 'position',[1 10],'String','rrr','parent',ax(2))
  댓글 수: 3
Youcef Yahiaoui
Youcef Yahiaoui 2015년 10월 30일
Great, Malek. Thanks, Youcef
Youcef Yahiaoui
Youcef Yahiaoui 2015년 10월 30일
편집: Youcef Yahiaoui 2015년 11월 2일
Thanks, Mr. Azzi again! it actually works. It was my program that was computer y out of the chart! Thanks for your post.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Two y-axis에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by