How do I add a labels to each bar in a bar graph?
조회 수: 4 (최근 30일)
이전 댓글 표시
How can I label each individual bar on a bar graph? I used the xlabel function to get the names circled in red (see fig 1) but thats not what I want to do, I don't want to simply label the X-axis, in short how do I make the titles circled in red in fig 1 replace the values circled in blue in fig 1?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/293107/image.jpeg)
I tried following the example provided here https://www.mathworks.com/help/matlab/ref/bar.html#bvl9b2c-1 but that didn't work, I even created an entirely new code and copied and pasted the code provided in the example to see if it worked and it didn't work. This is the error it gave me:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/293108/image.jpeg)
Can someone please help me with this?
댓글 수: 0
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Exploration에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!