MATLAB: Deactivate ButtonDownFcn ? stupid question

buttondownfunctionpushbutton

Hey Guys,
stupid Question: I have created a function(pushbutton) with the ButtonDownFcn to work with my Plot. Its task is to zoom in everytime i click on the plot. Now is there a way, to deactivate the ButtonDownFcn ? so i can click on a plot without triggering the fcn ?

Best Answer

Maybe you can have for example a radio button. In your buttonDownFcn you can have an if statement to check if the radiobutton is activated or not. If it's not activated you will zoom, and if it is activated you won't zoom.