Re: [問題] matlab 設計gui時插入背景圖檔的問題

看板MATLAB作者 (winse)時間12年前 (2011/11/11 14:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
※ 引述《o03213 (小老鼠的天空)》之銘言: : 小弟目前再設計一個gui : 目前我可以用gui按鈕控制視訊的開關,但我希望指令叫出來的視訊視窗 : 可以在我設計的gui裡面希望可以放在一起,但是不知道怎麼做 : 順便問一下,想要再gui背景放入圖檔比較美觀 : 但是找不到關於放置圖檔的屬性 : 該怎麼做尼???感謝各位大大感激不盡 剛好在其他地方看到,順便回一下文 Write following code in the CreateFcn of your GUI. % =================================================== % This creates the 'background' axes ha = axes('units','normalized', ... 'position',[0 0 1 1]); % Move the background axes to the bottom uistack(ha,'bottom'); % Load in a background image and display it using the correct colors % The image used below, is in the Image Processing Toolbox. % If you do not have % access to this toolbox, you can use another image file instead. I=imread('eight.tif'); hi = imagesc(I) colormap gray % Turn the handlevisibility off so that we don't inadvertently plot into the % axes again % Also, make the axes invisible set(ha,'handlevisibility','off', ... 'visible','off') % Now we can use the figure, as required. % For example, we can put a plot in an axes axes('position',[0.3,0.35,0.4,0.4]) plot(rand(10)) % Or you can arrange this you gui objects. % ========================================================== -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.76.107
文章代碼(AID): #1ElC5cHD (MATLAB)
文章代碼(AID): #1ElC5cHD (MATLAB)