bar graph doesn't show whole data

3 views (last 30 days)
imp_2d_7_f=[2 1 2 3 6 5;0 0 2 5 4 5;1 2 3 0 1 2;3 2 2 1 5 5;1 3 2 4 4 6;0 0 2 3 6 9;...
1 1 2 3 9 9;0 1 3 5 7 3;1 1 2 3 5 23;1 1 1 2 5 31;1 1 2 2 3 5;1 2 8 12 13 46;...
0 0 1 2 4 6;0 1 1 2 6 10;0 0 1 2 4 4;1 1 2 4 5 10;0 1 3 3 6 0];
bar(imp_2d_7_f)
set(gca, 'XTickLabel',{'ALGO','ALIC','ALRT','ANKR','BRAZ','CAS1','CCJ2','CKIS','MAS1','MAW1','MCM4','NOVM','NYA1','ROTH','SCOR','TIXI','ZAMB'});
title('2D Coordinate Improvements (cutoff: 7 degree)','FontWeight','bold','FontSize',20);
xlabel('STATIONS', 'FontWeight', 'bold','FontSize',20);
ylabel('millimeter ', 'FontWeight','bold','FontSize',20)
legend('24h','12h','6h','4h','2h','1h');
set(gca,'FontWeight','bold')
set(gca,'fontsize',20)
The above codes cannot show the whole stations data. Could you specify the problem?

Accepted Answer

Star Strider
Star Strider on 20 Feb 2019
Try this:
bar(imp_2d_7_f)
xtv = get(gca, 'XTick');
xtl = {'ALGO','ALIC','ALRT','ANKR','BRAZ','CAS1','CCJ2','CKIS','MAS1','MAW1','MCM4','NOVM','NYA1','ROTH','SCOR','TIXI','ZAMB'};
xtnew = linspace(1, numel(xtl), numel(xtl));
set(gca, 'XTick',xtnew, 'XTickLabel',xtl, 'XTickLabelRotation',90);
...

More Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!