Why will quiver not overlay an imshow figure of uiaxes in appdesigner?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Cameron Starling
am 8 Feb. 2022
Kommentiert: Cameron Starling
am 9 Feb. 2022
Hi, I have a basic dicom viewer app I'm working on and want to be able to overlay a quiver arrow onto the same uiaxes as the image displayed using imshow. I have looked through similar questions which seem to imply this is quite straightforward, and can be achieved by writing them to the same axes (app.UIAxes), with a 'hold on' in between to enable overwrites. This does not work for me however, using:
imshow(image,gray,'parent',app.UIAxes);
hold on
quiver(app.UIAxes,256,256,-1,-1) % just some dummy numbers
I appreciate I haven't set axis limits, but I would still expect to have only 1 figure, even if I couldn't see the arrow. How can I force the arrow and image to share the same axes?/What am I failing to understand?
Cheers, C
2 Kommentare
Akzeptierte Antwort
Walter Roberson
am 9 Feb. 2022
hold on
You have not told hold which axes to work against. It is going to search for the active axes to change the properties of. It is only going to search traditional axes in traditional figures, and will never look at the uifigure uiaxes to determine if it is active. Then, not seeing an active traditional figure, it is going to create one...
You need
hold(app.UIAxes, 'on')
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu DICOM Format finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!