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 Center および File ExchangeLabels and Annotations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by