How to change spacing in tick labels on bar graph

조회 수: 11 (최근 30일)
Chaine San Buenaventura
Chaine San Buenaventura 2016년 11월 28일
댓글: VBBV 2022년 11월 13일
My problem is that the labels are not aligned with the bar it corresponds to. Also, some labels were not displayed. Please help.
  댓글 수: 1
dpb
dpb 2016년 11월 28일
Show an example of your data and plot that illustrates the issue. Attach the figure as well would be good...save as .jpg say, and use the colored image button to select/attach it...we're left guessing as to what the real issue is; you can certainly use X values with bar that reflect the positions of the data.

댓글을 달려면 로그인하십시오.

채택된 답변

Preethi
Preethi 2016년 11월 28일
hi,
Use can use XTick and XTicklabel feature.
  댓글 수: 3
Chaine San Buenaventura
Chaine San Buenaventura 2016년 11월 28일
this code is for bar graphs?
VBBV
VBBV 2022년 11월 13일
bar(1:5)
set(gca,'XTick',1:5)
z ={'a','b','c','d','e'}
z = 1×5 cell array
{'a'} {'b'} {'c'} {'d'} {'e'}
set(gca,'XTickLabel',z)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Printing and Saving에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by