Removing Upper XTicks ..or Right Y Ticks..How?

107 visualizaciones (últimos 30 días)
Orkun OZENER
Orkun OZENER el 16 de Jun. de 2011
Comentada: Chaoyue Zhang el 17 de Mayo de 2022
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 comentario
Arturo Moncada-Torres
Arturo Moncada-Torres el 16 de Jun. de 2011
Could you please also post the code where you are plotting? Maybe even some sample data?

Iniciar sesión para comentar.

Respuestas (2)

Bjorn Gustavsson
Bjorn Gustavsson el 16 de Jun. de 2011
set(gca,'box','off')
  2 comentarios
Orkun OZENER
Orkun OZENER el 16 de Jun. de 2011
Thanks Bjorn,
This is an alternative solution what I want...Really thanks...
I missed out this alternative..
It solved my problem temporarily...
But how can I do it with the box is located...
The box is located..And the tick marks at the up are removed..?
How...I am searching...
Bjorn Gustavsson
Bjorn Gustavsson el 16 de Jun. de 2011
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

Iniciar sesión para comentar.


Arturo Moncada-Torres
Arturo Moncada-Torres el 16 de Jun. de 2011
I recommend you to look at this thread, where your same question has already been answered in several ways ;-).
  5 comentarios
Leon Aksman
Leon Aksman el 19 de Dic. de 2018
Works, thanks a lot!
Chaoyue Zhang
Chaoyue Zhang el 17 de Mayo de 2022
It does work! Thank you!

Iniciar sesión para comentar.

Categorías

Más información sobre Specifying Target for Graphics Output en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by