how to use handles on subplot?

11 vues (au cours des 30 derniers jours)
nirit
nirit le 23 Août 2018
Commenté : Adam le 23 Août 2018
hello. newbie on handles.
I have an image and 2 different algorithms, each resulting 2 different outputs, which mark pixels on the image. and I want to compare the 2 outputs visually. so I want to plot on one figure 2 subplots - each containing the same image- say frame0. when the keyboard is pressed (for example the right arrow) I want both subplot to show frame1.. and so one. the only different thing between the two subplot is that subplot(1) shows the output of alg1, and ubplot(2) shows the output of alg2. how can this be done smartly using handles?
thanks.
  1 commentaire
Adam
Adam le 23 Août 2018
hAxes(1) = subplot( 1, 2, 1 );
hImage(1) = imagesc( hAxes(1),... );
hAxes(2) = subplot( 1, 2, 2 );
hImage(2) = imagesc( hAxes(2),... );
Then you can just update the 'CData' property of hImage(1) and hImage(2) to whatever you want from your two algorithms.

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by