Problems with the limits of axes

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

 채택된 답변

Lucas García
Lucas García 2011년 8월 29일

1 개 추천

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

댓글 수: 1

Nu9
Nu9 2011년 8월 29일
thanks for the tip, it worked. in the beginning i've the reverse ydir, i disable that but it nerver changed.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Line Plots에 대해 자세히 알아보기

질문:

Nu9
2011년 8월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by