Bar plot axes size using text in X axis

10 vues (au cours des 30 derniers jours)
Abhinav Karthik Sridhar
Abhinav Karthik Sridhar le 18 Oct 2019
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?

Réponse acceptée

Sulaymon Eshkabilov
Sulaymon Eshkabilov le 19 Oct 2019
Modifié(e) : Sulaymon Eshkabilov le 19 Oct 2019
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 commentaires
Abhinav Karthik Sridhar
Abhinav Karthik Sridhar le 21 Oct 2019
Thank you!
Sulaymon Eshkabilov
Sulaymon Eshkabilov le 21 Oct 2019
You are welcome!

Connectez-vous pour commenter.

Plus de réponses (0)

Produits


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by