Borrar filtros
Borrar filtros

give title to a background image in gui

1 visualización (últimos 30 días)
Elysi Cochin
Elysi Cochin el 9 de Mayo de 2014
Respondida: Image Analyst el 9 de Mayo de 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');

Respuesta aceptada

Image Analyst
Image Analyst el 9 de Mayo de 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')

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by