Effacer les filtres
Effacer les filtres

give title to a background image in gui

1 vue (au cours des 30 derniers jours)
Elysi Cochin
Elysi Cochin le 9 Mai 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');

Réponse acceptée

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

Plus de réponses (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by