Font size in bar graph

31 次查看(过去 30 天)
Jan
Jan 2015-1-10
评论: Jan 2015-1-10
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

采纳的回答

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

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Labels and Annotations 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by