Implement a figure in GUI

Hello,
I want to implement different images (from the web) (which will pop up separately) in GUI. Is this possible? I have no experience with GUI so it is very hard to find.
Can anybody help me?
Laura

Answers (1)

Image Analyst
Image Analyst on 7 Jul 2016
Just call "figure" anytime in your code that you want a brand new figure to be created.

5 Comments

function simple_gui2
% SIMPLE_GUI2 Select a data set from the pop-up menu, then
% click one of the plot-type push buttons. Clicking the button
% plots the selected data in the axes.
f = figure('Visible','off','Position',[360,500,450,285]);
end
... something like this? How can I specify which figure I want to show?
You can pass the handle back into the figure function.
f1 = figure('Visible','off','Position',[360,500,450,285]);
f2 = figure('Visible','off','Position',[500,300,650, 985]);
% Switch to figure 1
figure(f1);
plot(1:10, 'r*-'); % Plot in figure 1
% Switch to figure 2
figure(f2);
plot(1:20, 'bs-'); % Plot in figure 2
Laura Sels
Laura Sels on 7 Jul 2016
Edited: Laura Sels on 7 Jul 2016
Ok. I get two graphs with each a linear line. But I want to display an image (from the browse). Where can I put this image?
S.fh = figure('units','pixels',... 'position',[500 500 200 260],... 'menubar','none',... 'name','puppy.fig',... 'numbertitle','off',... 'resize','off');
Something like this will work? Do I have to fill in alle the arguments?
Instead of calling plot(), call imshow() to display an image. Or display anything you want with bar(), surf(), or whatever.
Perhaps you want to get up to speed quickly with a framework that is already built: http://www.mathworks.com/matlabcentral/fileexchange/24224-magic-matlab-generic-imaging-component
"Description
This GUI will help the novice user get up to speed very quickly on using GUI-based applications. Everything is laid out in a very simple Step 1, Step 2, Step 3, etc. layout. It is a very good starting point for a typical image analysis application. This application uses GUIDE to do the user interface design, and has most of the basic controls such as buttons, listboxes, checkboxes, radio buttons, scrollbars, etc. It allows the user to select a folder of images, select one or more images and display them, to select a series of options, and to individually or batch process one or more images. The user can ....."

Sign in to comment.

Categories

Find more on Display Image in Help Center and File Exchange

Tags

Asked:

on 7 Jul 2016

Commented:

on 7 Jul 2016

Community Treasure Hunt

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

Start Hunting!