Scatter Plot with multiple 'levels' on the Xaxis
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello Everyone,
I am trying to make a relatively complex plot.
Can the community please help me - I would like to have multiple 'levels' of X axis?
To explain myself better, below is the desired result (image) and attached is the example data (with constrains noted in the excel)....

Thank you.
Bharat
0 commentaires
Réponses (1)
Adam Danz
le 11 Fév 2021
Modifié(e) : Adam Danz
le 11 Fév 2021
I see two options.
1. Since the "test" and country labels are vertically stacked, you could set multiple rows of x-tick labels for those labels and single rows for the other tick labels, all in the same line of code.
ticks = {'1' 'Test' '10' '1' 'Test' '10' '1' 'Test' '10' '1' 'Test' '10'; ...
'' 'USA' '' '' 'Mexico' '' '' 'Canada', '' 'Peru' ''};
2 commentaires
Adam Danz
le 15 Fév 2021
If you want the axes to be bordering each other, you can achieve that by setting axes directly with axes().
Voir également
Catégories
En savoir plus sur Scatter Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!