Show tick marks above plot
36 次查看(过去 30 天)
显示 更早的评论
I have a 3D plot that I am viewing from the top, so that it looks like a 2D plot. How can I display the tick marks above the plot? I tried using
set(gca, 'Layer', 'top')
but that only brought the major tick marks to the top and left the minor tick marks hidden. Worse, it also brought the dotted gridlines, which I do not want to see, to the top.
1 个评论
itamar luzon
2018-12-25
I know it's been a long time, but
use this after ploting
set(gca,'Layer','top')
回答(3 个)
Azzi Abdelmalek
2013-2-4
编辑:Azzi Abdelmalek
2013-2-4
Use
a=xlim;
set(gca,'xlabel',linspace(a(1),a(2),8))
%do the same for ylabel and zlabel
3 个评论
Maciej Dabrowski
2020-12-1
I didn't work for me as well. I'm getting Error using matlab.graphics.axis.Axes/set
Error setting property 'XLabel' of class 'Axes':
Value must be a handle.
Sean de Wolski
2013-2-4
hAx = axes;
plot(1:10);
set(hAx,'XAxisLocation','Top');
3 个评论
Sean de Wolski
2013-2-4
Hi Bernoulli,
I guess I don't see why this wouldn't work:
hAx = axes;
surf(hAx,peaks)
set(hAx,'XAxisLocation','Top');
view(2)
xlabel('Hello World')
Please post a picture of what you expect, and where.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!