The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Plot an image in an axes into a standalong new figure window ...
Replies: 4   Last Post: Oct 7, 2010 1:07 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 6
Registered: 10/7/10
Re: Plot an image in an axes into a standalong new figure window ...
Posted: Oct 7, 2010 12:28 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Steven_Lord" <> wrote in message <i8kqn8$iq0$>...
> "Sanghee " <> wrote in message
> news:i8kq3j$8aa$

> > Right now, I am learning MATLAB GUI using GUIDE, and getting a lot of help
> > from the examples on the mathworks.
> >
> > While trying an example, in
> > /usr/local/matlab/R2009b/help/techdoc/creating_guis/examples/tablestat.fig
> >
> > I found some weird thing. Basically, it will allow user to plot a figure
> > (a graph in
> > the example) in an axes to a standalone new figure window when user clicks
> > the axes with mouse right button and select 'Open plot in new window'.
> > But, I noticed that I have 'Open plot in new window' only when I click in
> > the empty
> > space in the plot, and don't have 'Open plot in new window' message box
> > when
> > I click the drawn line in the figure.

> That's correct; more than likely that example uses the axes ButtonDownFcn
> property, which does not trigger if the user doesn't click on the axes
> itself. The _line's_ ButtonDownFcn property would trigger if you clicked on
> the line.
> "Executes whenever you press a mouse button while the pointer is within the
> axes, but not over another graphics object parented to the axes."

> > So, I never get to have the 'Open plot in new window', when I completely
> > fill in the axes with an image since I think the program does not
> > recognize the axes ?

> That's correct -- you aren't clicking on the _axes_, you're clicking on the
> _image_.

> > However, again, I get it when I click the empty axes before filling the
> > axes with an image.
> >
> > Can anyone suggest any solution for this ?

> Change the value of the HitTest property for those objects that you don't
> want to "count" as being clicked upon.
> --
> Steve Lord
> comp.soft-sys.matlab (CSSM) FAQ:
> To contact Technical Support use the Contact Us link on

Thanks for the quick reply. I think 'HitTest' could be an option, but I am not sure how
I can handle it in my case.

My case is simple. I have a 2D image array, let's say xx, which is 256x256 matrix,
and all I do do display it in axes1 in a callback function triggered by a button,

imagesc(xx);axis equal off

That's it, but I am wondering how I can apply your suggestion into here.


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.