Thread Subject: imshow problem

Subject: imshow problem

From: Bita Mirshafiee

Date: 23 Dec, 2011 11:58:37

Message: 1 of 9

Hi all,

I have a problem about how to show the name of the image on top of the
window of the figure while using IMSHOW command.

the image showed but there is just this 'Figure 1' on top of the
image, how can I write the name of the image instead on top?

Thanks in advance.
Sophia.

Subject: imshow problem

From: ImageAnalyst

Date: 23 Dec, 2011 12:41:54

Message: 2 of 9

On Dec 23, 6:58 am, Bita Mirshafiee <b.mirshafie...@gmail.com> wrote:
> Hi all,
>
> I have a problem about how to show the name of the image on top of the
> window of the figure while using IMSHOW command.
>
> the image showed but there is just this 'Figure 1' on top of the
> image, how can I write the name of the image instead on top?
>
> Thanks in advance.
> Sophia.

--------------------------------------------------------------------------------------------------
Sophia:

% Enlarge figure to full screen.
set(gcf, 'units','normalized','outerposition',[0 0 1 1]);
% Rename figure title bar.
set(gcf,'name','Demo by ImageAnalyst','numbertitle','off')

You could put any string variable in place of 'Demo by ImageAnalyst'
if you want, such as the filename of the image you displayed.

Subject: imshow problem

From: Jomar Bueyes

Date: 23 Dec, 2011 12:43:13

Message: 3 of 9

On Dec 23, 6:58 am, Bita Mirshafiee <b.mirshafie...@gmail.com> wrote:
> Hi all,
>
> I have a problem about how to show the name of the image on top of the
> window of the figure while using IMSHOW command.
>
> the image showed but there is just this 'Figure 1' on top of the
> image, how can I write the name of the image instead on top?
>
> Thanks in advance.
> Sophia.

Hi Sophia,

After imshow use the 'set' command to set the name of the figure. E.g.

>> set(gca, 'Name', 'My Figure Name');

HTH

Jomar

Subject: imshow problem

From: Bita Mirshafiee

Date: 23 Dec, 2011 20:58:07

Message: 4 of 9

On Dec 23, 3:43 pm, Jomar Bueyes <jomarbue...@hotmail.com> wrote:
> On Dec 23, 6:58 am, Bita Mirshafiee <b.mirshafie...@gmail.com> wrote:
>
> > Hi all,
>
> > I have a problem about how to show the name of the image on top of the
> > window of the figure while using IMSHOW command.
>
> > the image showed but there is just this 'Figure 1' on top of the
> > image, how can I write the name of the image instead on top?
>
> > Thanks in advance.
> > Sophia.
>
> Hi Sophia,
>
> After imshow use the 'set' command to set the name of the figure. E.g.
>
> >> set(gca, 'Name', 'My Figure Name');
>
> HTH
>
> Jomar

Thanks Jomar, it helped :)

Subject: imshow problem

From: Bita Mirshafiee

Date: 23 Dec, 2011 20:56:49

Message: 5 of 9

On Dec 23, 3:41 pm, ImageAnalyst <imageanal...@mailinator.com> wrote:
> On Dec 23, 6:58 am, Bita Mirshafiee <b.mirshafie...@gmail.com> wrote:
>
> > Hi all,
>
> > I have a problem about how to show the name of the image on top of the
> > window of the figure while using IMSHOW command.
>
> > the image showed but there is just this 'Figure 1' on top of the
> > image, how can I write the name of the image instead on top?
>
> > Thanks in advance.
> > Sophia.
>
> --------------------------------------------------------------------------------------------------
> Sophia:
>
> % Enlarge figure to full screen.
> set(gcf, 'units','normalized','outerposition',[0 0 1 1]);
> % Rename figure title bar.
> set(gcf,'name','Demo by ImageAnalyst','numbertitle','off')
>
> You could put any string variable in place of 'Demo by ImageAnalyst'
> if you want, such as the filename of the image you displayed.

Thanks a lot for helping, but I have some questions about SET
command.
In SET what does gcf do? I searched it in MATLAB help it says :

GCF Get handle to current figure.

What does it mean?

I didn't find anything for these variables:
'units','normalized','outerposition',[0 0 1 1]
What's their use?and what do they mean?

Sorry for asking too much. I just want to understand this command
better.

It would be very nice of you if you help me again.

Thanks in advance.
Sophia.

Subject: imshow problem

From: mike

Date: 24 Dec, 2011 00:55:10

Message: 6 of 9

On Dec 23, 3:58 pm, Bita Mirshafiee <b.mirshafie...@gmail.com> wrote:
> On Dec 23, 3:43 pm, Jomar Bueyes <jomarbue...@hotmail.com> wrote:
> > >> set(gca, 'Name', 'My Figure Name');
>
> > HTH
>
> > Jomar
>
> Thanks Jomar, it helped :)
-------------------------------------------------------------------
Are you being sarcastic? It didn't help. It couldn't because axes
does not have a name property. I didn't think it did so I tried and
got this error:
Error using hg.axes/set
The name 'Name' is not an accessible property for an instance of class
'axes'.
You will have to do it the way I said, not the way Jomar says, and
that is to use gcf NOT gca.

Subject: imshow problem

From: mike

Date: 24 Dec, 2011 00:57:42

Message: 7 of 9

On Dec 23, 3:56 pm, Bita Mirshafiee <b.mirshafie...@gmail.com> wrote:
> On Dec 23, 3:41 pm, ImageAnalyst <imageanal...@mailinator.com> wrote:
>
> Thanks a lot for helping, but I have some questions about SET
> command.
> In SET what does gcf do? I searched it in MATLAB help it says :
>
> GCF Get handle to current figure.
>
> What does it mean?
>
> I didn't find anything for these variables:
> 'units','normalized','outerposition',[0 0 1 1]
> What's their use?and what do they mean?
>
> Sorry for asking too much. I just want to understand this command
> better.
>
> It would be very nice of you if you help me again.
>
> Thanks in advance.
> Sophia.
-------------------------------------------------------------------------------------------

Sophia:
gcf is the handle to the current (i.e. last used) figure window.
Look under "Figure properties" in the help for a list of properties
held by the "figure" class.
ImageAnalyst

Subject: imshow problem

From: Bita Mirshafiee

Date: 24 Dec, 2011 10:10:49

Message: 8 of 9

On Dec 24, 3:55 am, mike <michaelhayworth...@gmail.com> wrote:
> On Dec 23, 3:58 pm, Bita Mirshafiee <b.mirshafie...@gmail.com> wrote:> On Dec 23, 3:43 pm, Jomar Bueyes <jomarbue...@hotmail.com> wrote:
> > > >> set(gca, 'Name', 'My Figure Name');
>
> > > HTH
>
> > > Jomar
>
> > Thanks Jomar, it helped :)
>
> -------------------------------------------------------------------
> Are you being sarcastic?  It didn't help.  It couldn't because axes
> does not have a name property.  I didn't think it did so I tried and
> got this error:
> Error using hg.axes/set
> The name 'Name' is not an accessible property for an instance of class
> 'axes'.
> You will have to do it the way I said, not the way Jomar says, and
> that is to use gcf NOT gca.

It helped just for introducing me the SET command(as you said),
otherwise I used what you've said, complete and without any errors. :)

Subject: imshow problem

From: Bita Mirshafiee

Date: 24 Dec, 2011 10:17:42

Message: 9 of 9

On Dec 24, 3:57 am, mike <michaelhayworth...@gmail.com> wrote:
> On Dec 23, 3:56 pm, Bita Mirshafiee <b.mirshafie...@gmail.com> wrote:
>
>
>
>
>
>
>
> > On Dec 23, 3:41 pm, ImageAnalyst <imageanal...@mailinator.com> wrote:
>
> > Thanks a lot for helping, but I have some questions about SET
> > command.
> > In SET what does gcf do? I searched it in MATLAB help it says :
>
> > GCF Get handle to current figure.
>
> > What does it mean?
>
> > I didn't find anything for these variables:
> > 'units','normalized','outerposition',[0 0 1 1]
> > What's their use?and what do they mean?
>
> > Sorry for asking too much. I just want to understand this command
> > better.
>
> > It would be very nice of you if you help me again.
>
> > Thanks in advance.
> > Sophia.
>
> -------------------------------------------------------------------------------------------
>
> Sophia:
> gcf is the handle to the current (i.e. last used) figure window.
> Look under "Figure properties" in the help for a list of properties
> held by the "figure" class.
> ImageAnalyst

Thank you, I think now it's more comprehensive for me :)

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com