XTickLabel for large number of bars

I'm trying to label each of the bar on the X axis (say bar apple, orange, grape, etc.) using bar() and XTickLabel. The code works fine until 15 bars but after that, the x tick label doesn't work properly getting spread out and I need to plot much more than that. Currently I'm coding it as
bar([data1' data2' data3']);
set(gca,'XTickLabel',{'Apple','Orage','Grape',...});
Is there a way to use XTickLabel for large number of bars? Or some other method I can use?

답변 (1개)

José-Luis
José-Luis 2014년 8월 26일

0 개 추천

You could use a smaller font or make the text vertical.
<http://www.mathworks.com/help/symbolic/mupad_ref/tickslabelstyle.html>

카테고리

도움말 센터File Exchange에서 Histograms에 대해 자세히 알아보기

질문:

2014년 8월 26일

답변:

2014년 8월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by