Removing Upper XTicks ..or Right Y Ticks..How?
107 次查看(过去 30 天)
显示 更早的评论
Hi,
I am trying to remove the Xticks that is located only at the upper side and the YTicks that is located right side of my plot.But I could not managed to do it.
I Tried
set(gca, 'XTick',[])
...
set(gca, 'YTick',[])
command but they removed both X ticks up and above or or Both Y Ticks left and right.
Is there any way of removing only one side (up or above...left or right.)
Thanks From Now... Orkun ÖZENER
1 个评论
Arturo Moncada-Torres
2011-6-16
Could you please also post the code where you are plotting? Maybe even some sample data?
回答(2 个)
Bjorn Gustavsson
2011-6-16
set(gca,'box','off')
2 个评论
Bjorn Gustavsson
2011-6-16
I don't know if you can. Maybe the simplest is just to plot the box manually?
isholdonque = ishold;
hold on
ax = axis;
plot(ax(2)*[1,1],ax(3:4),'k','linewidth',0.5)
plot(ax(1:2),ax(4)*[1,1],'k','linewidth',0.5)
if isholdonque == 0
hold off
end
Arturo Moncada-Torres
2011-6-16
I recommend you to look at this thread, where your same question has already been answered in several ways ;-).
5 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Specifying Target for Graphics Output 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!