Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

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 ]
Sanghee

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" <slord@mathworks.com> wrote in message <i8kqn8$iq0$1@fred.mathworks.com>...
>
>
> "Sanghee " <scho.2000@gmail.com> wrote in message
> news:i8kq3j$8aa$1@fred.mathworks.com...

> > 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.
>
> http://www.mathworks.com/help/techdoc/ref/axes_props.html#ButtonDownFcn
>
> "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.
>
> http://www.mathworks.com/help/techdoc/ref/image_props.html#HitTest
>
> --
> Steve Lord
> slord@mathworks.com
> comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com

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,

axes(handles.axes1);
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]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.