image upside down (including axis labels etc) using App designer: same code OK outside GUI

Using image(app.UIAxes,C) in draw() callback. ComponentBrowser/Axes/Rulers/YDir setting makes no difference. Changing YDir after image() line changes the displayed image, but leaves the axes upside down. No idea what [x,y]=ginput(1) is giving back - not what I wanted anyway.

댓글 수: 2

I wonder if somehow you have two axes in the same place?
DId you possibly use yyaxis ? Or did you possibly create an axes as part of the app design, but also call axes() inside your code, and so doing create a second axes?
No, just called : app.data.classname.function(app.UIAxes) in the draw() callback, and the class method calls image(ax,C), where ax is the passed axes object.
The text of the axes ruler numbers is drawn upside down! I could not do that if I tried.

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

답변 (1개)

shut down matlab and opened it again, and it all works!
Some internal matlab state bug.

댓글 수: 2

Happened again: seems can be caused by exiting a GUI using the window close x button (on Ubuntu) rather than by the Done button on the GUI display.

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

카테고리

도움말 센터File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

질문:

2023년 2월 23일

댓글:

2023년 2월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by