Position of text objects ?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Max Müller
el 22 de Ag. de 2014
Respondida: Adam
el 22 de Ag. de 2014
Hey Guys,
It is possible to add some text to each Point, after u have plotted an Array. If u call not the children of the axes u get as many children as u have text objects + one child for the plot line. Now I want to ask u: Is it possible to get the x and y Value of the text position ?
example:
%%%%%%%%%%%%%%%%%%%
x = 1:10
y = 3*x
name = 'hello'
plot(x,y)
text(x,y,name)
%%%%%%%%%%%%%%%%%%%
0 comentarios
Respuesta aceptada
Adam
el 22 de Ag. de 2014
Use
hText = text(x,y,name)
instead.
That will give you an array of handles for each text object. You can then call e.g.
pos = get( hText(1), 'Position' );
to get the coordinates (x,y,z) of the that text item
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Annotations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!