bonjour,

Je veux afficher deux graphes sur une figure, j'ai donc deux axes et je charge deux image avec imagesc : j'utilise la propriete Parent pour associer a chaque image une axe mais le probleme c est que quand l axe s affiche aussi quand je lance mon programme :

voici un bout de mon code:

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
19
20
21
22
23
24
25
26
27
28
29
30
 
f = figure('Visible','off','OuterPosition',[200,200,1300,850]);
haX = axes('Units','pixels','Position',[50,100,1050,400],'Visible','off');
ha = axes('Units','pixels','Position',[50,400,1050,400],'Visible','off');
 
set(ha,'Units','normalized');
set(haX,'Units','normalized');       
set(f,'Visible','on');
 
function dl1(source, eventdata)        
        filename = uigetfile( ...
        {'*.mat','MAT-files (*.mat)'; ...
         '*.*',  'All Files (*.*)'}, ...
         'Pick a file');
        if filename~=0
            set(name1,'String', filename);            
            S=load(filename);
            current_data=S.db;
            xaxis=S.x;
            yaxis=S.distance;  
            subplot(3, 1, 1);
            imagesc(xaxis, yaxis, current_data,'Parent',ha);
            daspect([1 1 1]);%lock data aspect ratio to equal across all axes
            title(filename);
            xlabel('Distance Along Tissue (mm)')
            ylabel('Imaging Depth (mm)')
            colormap('jet')
            colorbar
        end
end
Qu est ce que je fais pas correctement ?
Merci