Font size in bar graph

조회 수: 33 (최근 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