MATLAB: Problems with the limits of axes

axesaxislimitsplot

Hi, i've this code for the axes but the the order of the y axes is reverse, it goes (buttom to top) 10 ->0.
Axes2 = axes('Units', 'pixels',...
'position', [299 125 451 320], ...%posiƧao na janela
'Visible', 'on');
image(Img, 'Parent', Axes2);
axis([0 10 0 10])
%axis tight
set(get(Axes2,'XLabel'),'String','axis label')
set(get(Axes2,'YLabel'),'String','axis label')
axis on;%tira os eixos e valores

Best Answer

This is an expected behavior of the image function. The direction of the y-axis is reversed.
Notice that if you set the axes to normal direction, both the image and the y-axis get reversed:
set(Axes2,'YDir','normal')
You can turn axis off it that's bothering you by typing:
axis off