Filter löschen
Filter löschen

How to set up a plot with labels but no Y-axis tick marks

1 Ansicht (letzte 30 Tage)
How to set up a plot with labels but no Y-axis tick marks

Akzeptierte Antwort

Star Strider
Star Strider am 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 Kommentare
weijie.zhu
weijie.zhu am 30 Nov. 2023
Thank you very much for your help. Sincere wishes!
Star Strider
Star Strider am 30 Nov. 2023
As always, my pleasure!
You, too!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by