subplot with number on top of bar
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
hi all!
if you are plotting a bar how is it possible to put the number on top of the bar so it is easier to look at?
thank you!!
0 comentarios
Respuesta aceptada
Image Analyst
el 8 de Sept. de 2012
You mean like this:
2 comentarios
Image Analyst
el 8 de Sept. de 2012
OK now you edited it to be a different question. This answer would be to use the text() function to place text wherever you want it.
Más respuestas (1)
Tom
el 8 de Sept. de 2012
Editada: Tom
el 8 de Sept. de 2012
You can use the annotation function to do this, there are a few ways to choose how to position the text.
AX=zeros(4,1);
for ii=1:4
AX(ii)=subplot(2,2,ii);
plot(rand(5))
end
A=annotation('textbox',[0.45,0.95,0.1,0.1],...
'String','Main Title',...
'HorizontalAlignment','Center',...
'VerticalAlignment','Bottom',...
'BackgroundColor','none',...
'EdgeColor','none');
See
doc annotation
for details
0 comentarios
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!