Font size in bar graph

31 visualizaciones (últimos 30 días)
Jan
Jan el 10 de En. de 2015
Comentada: Jan el 10 de En. de 2015
Hi, is there any way to change font size in a bar graph. I don't want to do this in xlabel, legend or title, but in numbers over each column. Unfortunately FonSize doesn't do that :(
y1 = bar(ErrKoff);
x_loc = get(y1, 'XData');
y_height = get(y1, 'YData');
arrayfun(@(x,y) text(x, y+70,num2str(y), 'Color', 'r'), x_loc, y_height);
set(gca, 'XTick', 1:5, 'XTickLabel', met);
regards

Respuesta aceptada

Image Analyst
Image Analyst el 10 de En. de 2015
Use text(), like in the attached demo.
  1 comentario
Jan
Jan el 10 de En. de 2015
It works!
there was a text() function but I didn't know that it should be fontsize.
Thanks :)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Labels and Annotations 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