give title to a background image in gui
2 views (last 30 days)
Show older comments
Elysi Cochin
on 9 May 2014
Answered: Image Analyst
on 9 May 2014
i inserted a background image to my gui... can i add title to it? if yes, please ca someone help me how to give a title on the north center of my gui
% create an axes that spans the whole gui
ah = axes('unit', 'normalized', 'position', [0 0 1 1]);
% import the background image and show it on the axes
bg = imread('example.jpg'); imagesc(bg);
% prevent plotting over the background and turn the axis off
set(ah,'handlevisibility','off','visible','off')
% making sure the background is behind all the other uicontrols
uistack(ah, 'bottom');
0 Comments
Accepted Answer
Image Analyst
on 9 May 2014
You can't give a title if it takes up the whole screen because titles go above images. However you can put text on the image with text(), or you can give a title to your window with set():
% Enlarge figure to full screen.
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0 0 1 1]);
% Give a name to the title bar.
set(gcf, 'Name', 'Demo by ImageAnalyst', 'NumberTitle', 'Off')
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!