how to change the size of the fonts inside the bar graph
조회 수: 10 (최근 30일)
이전 댓글 표시
Hi there,
I am using the bar code to draw a bar graph. So how to change the size of the fonts inside the graph, as shown in the attachment?
Many thanks!
Cheers
댓글 수: 0
채택된 답변
Chuguang Pan
2025년 5월 13일
편집: Chuguang Pan
2025년 5월 13일
x = [1 2 3];
vals = [2 3 6; 11 23 26];
b = bar(x,vals);
xtips1 = b(1).XEndPoints;
ytips1 = b(1).YEndPoints;
labels1 = string(b(1).YData);
text(xtips1,ytips1,labels1,'HorizontalAlignment','center',...
'VerticalAlignment','bottom','FontSize',15)
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Discrete Data Plots에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
