Setting axis limits of a plot

3 visualizaciones (últimos 30 días)
Matt
Matt el 4 de Jul. de 2011
I have two sets of data, x and y which I am plotting together:
plot(x,y)
I'm having a problem setting the axis limits however. I am using the method shown in the online documentation:
axis([xmin,xmax,ymin,ymax])
Or in my case:
axis([1,1024,1,1024])
The problem is when I enter this it creates a new figure with the correct limits but with no data plotted.

Respuesta aceptada

Paulo Silva
Paulo Silva el 4 de Jul. de 2011
axis(gca,[1,1024,1,1024])
or
ax=axes
plot(x,y)
axis(ax,[1,1024,1,1024])
  3 comentarios
Paulo Silva
Paulo Silva el 4 de Jul. de 2011
set(gca,'ydir','reverse')
C.J. Harris
C.J. Harris el 4 de Jul. de 2011
or simply:
axis ij

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by