Hi! I am trying to display images in two panels. I made push button and two panels with axes in it So this is my code:
[filename,pathname]=uigetfile({'*.*'},'Select file');
Filename=fullfile(pathname,filename);
var=strcat(pathname,filename);
ORI_IMG=imread(var);
axis(handles.axes1);
imshow(ORI_IMG);
title('original image');
but this display image in panel two. Is there any way I can choose in which panel I want to display my image?

 Respuesta aceptada

Sean de Wolski
Sean de Wolski el 29 de Dic. de 2014

0 votos

imshow(ORI_IMG,'Parent',handles.axes1)
Since the HandleVisibility for both axes if not 'on', they can never become the current axes and the axes(handles.axes1) line thus does nothing.

3 comentarios

Lolipop
Lolipop el 29 de Dic. de 2014
so panel must be on HandleVisibilty off or what? This works but the title is shown on second axes...
Sean de Wolski
Sean de Wolski el 29 de Dic. de 2014
title(handles.axes1,'Hello')
Pretty much every graphics function allows you to specify the axes. I would do this versus changing the HandleVisibility. The reason is that you don't want someone typing plot(1:10) at the command prompt and having it mess up your user interface.
Lolipop
Lolipop el 29 de Dic. de 2014
thank you

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Images en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 29 de Dic. de 2014

Comentada:

el 29 de Dic. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by