text position with plotyy

2 visualizaciones (últimos 30 días)
Alessandro
Alessandro el 23 de Abr. de 2014
Editada: Youcef Yahiaoui el 2 de Nov. de 2015
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.

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 23 de Abr. de 2014
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 comentarios
Youcef Yahiaoui
Youcef Yahiaoui el 30 de Oct. de 2015
Great, Malek. Thanks, Youcef
Youcef Yahiaoui
Youcef Yahiaoui el 30 de Oct. de 2015
Editada: Youcef Yahiaoui el 2 de Nov. de 2015
Thanks, Mr. Azzi again! it actually works. It was my program that was computer y out of the chart! Thanks for your post.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Two y-axis en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by