Bar plot axes size using text in X axis

조회 수: 5 (최근 30일)
Abhinav Karthik Sridhar
Abhinav Karthik Sridhar 2019년 10월 18일
댓글: Sulaymon Eshkabilov 2019년 10월 21일
So, I tried plotting a bar plot for an array with 25 items. I linked it with a unique string on the X-axis, but when I plot the Bar plot - I cannot see all the unique values eventhough I tried rotating the axis to 90 deg, reduced size of gca. Attached my code!
Basically, I want a unique value seen in my x axis corresponding to the value in Y axis (display of all X axis values).
How can I achieve this?

채택된 답변

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2019년 10월 19일
편집: Sulaymon Eshkabilov 2019년 10월 19일
Hi
Here is the solution for x axis:
xticks(1:numel(neworder(:,1)))
F = neworder(:,1);set(gca,'FontSize',4);
xtickangle(90);
xticklabels(F);
Good luck.
  댓글 수: 2
Abhinav Karthik Sridhar
Abhinav Karthik Sridhar 2019년 10월 21일
Thank you!
Sulaymon Eshkabilov
Sulaymon Eshkabilov 2019년 10월 21일
You are welcome!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by