Background image in GUI
Afficher commentaires plus anciens
Hello,
Here is my problem, I realize a GUI with GUIDE and I then export in .m . Now I'm trying to put an image in background in my GUI, but no matter what I did, when I run my GUI he opened two figures, one that this be my GUI and one with my image in the background.
Here is my code: I may be bad place right in my line. M I do not know
%I did not touch h1 = figure(... 'Units','characters',... 'PaperUnits',get(0,'defaultfigurePaperUnits'),... 'Color',[0.701960784313725 0.701960784313725 0.701960784313725],... 'Colormap',[0 0 0.5625;0 0 0.625;0 0 0.6875;0 0 0.75;0 0 0.8125;0 0 0.875;0 0 0.9375;0 0 1;0 0.0625 1;0 0.125 1;0 0.1875 1;0 0.25 1;0 0.3125 1;0 0.375 1;0 0.4375 1;0 0.5 1;0 0.5625 1;0 0.625 1;0 0.6875 1;0 0.75 1;0 0.8125 1;0 0.875 1;0 0.9375 1;0 1 1;0.0625 1 1;0.125 1 0.9375;0.1875 1 0.875;0.25 1 0.8125;0.3125 1 0.75;0.375 1 0.6875;0.4375 1 0.625;0.5 1 0.5625;0.5625 1 0.5;0.625 1 0.4375;0.6875 1 0.375;0.75 1 0.3125;0.8125 1 0.25;0.875 1 0.1875;0.9375 1 0.125;1 1 0.0625;1 1 0;1 0.9375 0;1 0.875 0;1 0.8125 0;1 0.75 0;1 0.6875 0;1 0.625 0;1 0.5625 0;1 0.5 0;1 0.4375 0;1 0.375 0;1 0.3125 0;1 0.25 0;1 0.1875 0;1 0.125 0;1 0.0625 0;1 0 0;0.9375 0 0;0.875 0 0;0.8125 0 0;0.75 0 0;0.6875 0 0;0.625 0 0;0.5625 0 0],... 'IntegerHandle','off',... 'InvertHardcopy',get(0,'defaultfigureInvertHardcopy'),... 'MenuBar','none',... 'Name','untitled',... 'NumberTitle','off',... 'PaperPosition',get(0,'defaultfigurePaperPosition'),... 'PaperSize',get(0,'defaultfigurePaperSize'),... 'PaperType',get(0,'defaultfigurePaperType'),... 'Position',[103.833333333333 29.1666666666667 112 32.3333333333333],... 'Resize','off',... 'HandleVisibility','callback',... 'UserData',[],... 'Tag','figure1',... 'Visible','on',... 'CreateFcn', {@local_CreateFcn, blanks(0), appdata} );
%I added that set(h1,'Units','Normalized','Position',[0 0 1 1]); image_backgnd=imread('open2.jpg'); axes('Position',[0 0 1 1]); image(image_backgnd); axis image; axis off;
%I did not touch hsingleton = h1;
Thank you for your help and sorry for my english, I'm french.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Display Image dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!