give title to a background image in gui

2 views (last 30 days)
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');

Accepted Answer

Image Analyst
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')

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!