do not display value on the axis

236 visualizaciones (últimos 30 días)
Locks
Locks el 18 de Mayo de 2013
Comentada: Trippy el 7 de Dic. de 2020
Hi,
I am looking for a code that allows me to plot a figure where there are no value displayed on the x axis
I tried to use this code here:
set(gca,'xtick',[])
but that didn't work, any suggestions?

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 18 de Mayo de 2013
Maybe the order is not good
plot(1:3,1:3)
set(gca,'xtick',[])
  4 comentarios
Locks
Locks el 18 de Mayo de 2013
that's working, thank you
Trippy
Trippy el 7 de Dic. de 2020
Try this.
set(gca,'XTick',[],'YTick',[])

Iniciar sesión para comentar.

Más respuestas (1)

Image Analyst
Image Analyst el 18 de Mayo de 2013
Try this:
set(gca, 'xtick', [-inf inf]);
  6 comentarios
Image Analyst
Image Analyst el 18 de Mayo de 2013
It doesn't seem to work because you used plotyy() instead of plot(). Do you really need two y axes? Can you use one common one?
dates=[1,2,3,4]
SPX=[0.1,0.2,0.1,0.2]
VIX=[0.02,0.28,0.2,0.3]
plot(dates,SPX,'gs-');
hold on;
plot(dates,VIX, 'bd-');
set(gca, 'xtick', [-inf inf]);
Locks
Locks el 18 de Mayo de 2013
I need two seperated axis due to the fact that the values on the left side go from around 1000 to around 2000 and on the right from 0 to 100

Iniciar sesión para comentar.

Categorías

Más información sobre Two y-axis 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