Is it possible to add a textbox outside the axes of a plot figure window?
350 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have tried the command "text(x,y,'String')" but that requires a specific location and my figure window plots always have different axes numbers.
I would like this textbox to always appear outside the axes as well (along the grey left part of the figure window)
How can this be done?
1 comentario
Jan
el 7 de Oct. de 2011
You forgot to mention, if you want to display the text relative to an axes or to the figure, or absolute in the figure etc. Settign the text location is easy, but it is hard to explain as long, as we have to guess, what you want exactly.
Respuestas (2)
Daniel Shub
el 7 de Oct. de 2011
figure;
plot(rand(5, 1))
annotation('textbox', [0, 0.5, 0, 0], 'string', 'My Text')
1 comentario
Sean de Wolski
el 6 de Oct. de 2011
Change your figure units to pixels and then it'll be consistent.
H = figure;
set(H,'units','pix','size',...)
%etc.
2 comentarios
Fangjun Jiang
el 6 de Oct. de 2011
When I do H=figure;plot(1:10);get(h,'units'), it returns 'pixels'. Should it be any one of the others?
[ inches | centimeters | normalized | points | {pixels} | characters ]
Sean de Wolski
el 7 de Oct. de 2011
You have a capital H and a lowercase h, fyi. Maybe it's the axes that should be in pixels instead of normalized?
Ver también
Categorías
Más información sobre Annotations en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!