From: kais on
in a simple way, how can I detect a mouse click in a figure, halt the execution (e.g a dynamic plot in a figure) when a click is detected until another click is detected so

1.figure is running a dynamic graph
2.user clicks on the figure
3. execution pauses
4.user clicks again on the same figure
5. execution resumes.

Thanks for your help...
From: Jan Simon on
Dear Kais!

> in a simple way, how can I detect a mouse click in a figure, halt the execution (e.g a dynamic plot in a figure) when a click is detected until another click is detected so
>
> 1.figure is running a dynamic graph
> 2.user clicks on the figure
> 3. execution pauses
> 4.user clicks again on the same figure
> 5. execution resumes.

The WindowsButtonDownFcn can set some flags for this case. Nevertheless, the excuting routine must check these flags from time to time. It cannot be stopped from the outside.

Kind regards, Jan