Bonjour,
J'ai une GUI qui permet d'afficher une image en cliquant sur un le bouton "start. Le code est le suivant:
En effet, l'image s'affiche sur l'axe que j'ai définit mais s'affiche aussi sur une autre figure.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 % --- Executes on button press in start. function start_Callback(hObject, eventdata, handles) start(handles.t); set(handles.showColor, 'backgroundColor', 'green'); % --- Executes on button press in stop. function stop_Callback(hObject, eventdata, handles) stop(handles.t); % --- Executes on button press in showColor. function showColor_Callback(hObject, eventdata, handles) % hObject handle to showColor (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) function Disp_image(obj, event, handles) axes(handles.axes1); img = imread('image\electronique.png'); image(img); axis(handles.axes1, 'image', 'off');
J'aimerai bien comprendre pourquoi l'image s'affiche sur l'autre figure, et comment y remédier?
NB: J'ai mis la fonction Disp_image car j'en aurai besoin pour ajouter d'autres commandes.
Partager