Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
buttondownfcn on a polarplot - please help me!!

Subject: buttondownfcn on a polarplot - please help me!!

From: Camille Couzi

Date: 25 Oct, 2010 19:32:04

Message: 1 of 4

HI,
I have a problem creating my buttondownfcn, on a polar plot. I have already made one for an axes which contains an imagesc, so I know that I have to fis 'hittest' propertie to off, and all other tips given in the thread:
http://www.mathworks.com/matlabcentral/newsreader/view_thread/165091#419072

The problem is that apparently when I plot a polar plot on my axes, there are more than one children:

chi=get(h.axe_polar,'children') => chi=38 !!!

So when I make:
set(get(h.eje_polar,'Children'),'HitTest','off')
I think the real problem is there...

Somebody has an idea?
please any help would be very usefull
Thanks in advance

Camille

Subject: buttondownfcn on a polarplot - please help me!!

From: Jan Simon

Date: 25 Oct, 2010 21:03:03

Message: 2 of 4

Dear Camille,

> I have a problem creating my buttondownfcn, on a polar plot.

What object of the polar plot should receive the event? The AXES, the grid, the line?

Jan

Subject: buttondownfcn on a polarplot - please help me!!

From: Camille Couzi

Date: 26 Oct, 2010 12:24:04

Message: 3 of 4

Hi Jan!
Thanks for replying!
I am making the button down fcn for the axes, so I have writen:

set(h.axes1,'buttondownfcn',{@bdfcn_polar,h})
set(get(h.axes1,'Children'),'HitTest','off')

The thing is that I have already made another buttondownfcn in another part of my gui, and that was on axes which were "receiving" imagesc plots. On that, my buttondownfcn are working perfectly. In fact, I have tried to change here "h.axes1" by the handle of a panel which is in the same window (just to see if there was a problem with the definition of the buttondownfcn itself, and that works perfectly, so yes, I am convinced that it is a problem with the polar plot.

I have read some other solutions, as putting the plot itself in the "set(...,'buttondownfcn',{...}) ", have tried it, but that don't work neither...

Any idea?
Thanks again for replying!
Camille.


"Jan Simon" <matlab.THIS_YEAR@nMINUSsimon.de> wrote in message <ia4ra7$1qu$1@fred.mathworks.com>...
> Dear Camille,
>
> > I have a problem creating my buttondownfcn, on a polar plot.
>
> What object of the polar plot should receive the event? The AXES, the grid, the line?
>
> Jan

Subject: buttondownfcn on a polarplot - please help me!!

From: Camille Couzi

Date: 26 Oct, 2010 13:03:04

Message: 4 of 4

Hi Again,
I have made some tests. I have found that changing the 'nextplot' propertie of the axes where I send the polar plot make a difference:
when I write:
set(eje,'nextplot','add'); or
% set(eje,'nextplot','areplacechildren');
my buttondownfcn works, but my plot is not working fine anymore, because of course, the plots are adding on top of the last one (I work with a GUI and plot many polars, one after the other), or with the replace children it makes the polar plot working bad.
Si changing this property is in fact not good for my case.
How can I do?
Thanks for your replies

Camille.

Tags for this Thread

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.

Contact us