Filter löschen
Filter löschen

How to change spacing in tick labels on bar graph

6 Ansichten (letzte 30 Tage)
Chaine San Buenaventura
Chaine San Buenaventura am 28 Nov. 2016
Kommentiert: VBBV am 13 Nov. 2022
My problem is that the labels are not aligned with the bar it corresponds to. Also, some labels were not displayed. Please help.
  1 Kommentar
dpb
dpb am 28 Nov. 2016
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.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Preethi
Preethi am 28 Nov. 2016
hi,
Use can use XTick and XTicklabel feature.
  3 Kommentare
Chaine San Buenaventura
Chaine San Buenaventura am 28 Nov. 2016
this code is for bar graphs?
VBBV
VBBV am 13 Nov. 2022
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)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Printing and Saving finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by