How to set up a plot with labels but no Y-axis tick marks
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
weijie.zhu
le 30 Nov 2023
Commenté : Star Strider
le 30 Nov 2023
How to set up a plot with labels but no Y-axis tick marks
0 commentaires
Réponse acceptée
Star Strider
le 30 Nov 2023
Perhaps this —
figure
boxchart(rand(10))
yt = yticks;
yline(yticks, '-k', 'Color',[1 1 1]*0.25)
Ax = gca;
Ax.YAxis.Visible = 0;
text(zeros(size(yt))-0.01*diff(double(xlim)), yt, compose('%g',yt), 'Horiz','right', 'Vert','middle')
.
2 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Axis Labels 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!