How to set up a plot with labels but no Y-axis tick marks
2 次查看(过去 30 天)
显示 更早的评论
How to set up a plot with labels but no Y-axis tick marks
0 个评论
采纳的回答
Star Strider
2023-11-30
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')
.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Axis Labels 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!