How to use uipushtool to click and drag plots in figure?
Show older comments
Hi, I am fairly new with the uipushtool in MATLAB. I want to click and drag plots in a figure by pressing a button I have created. The Click-n'-Drag m-file Jean-Pascal Rueff created : https://www.mathworks.com/matlabcentral/fileexchange/5751-click-n--drag-plot allows the user to automatically click and drag the plots in the figure created without pressing any previous buttons in the toolbar. I have tried to create a button to complete such task instead, but I keep getting an error message stating:
Error in interactive_move>dragger (line 80)
switch type
Error while evaluating PushTool ClickedCallback.
-----------------------------------------------------------------------------
Line 80 begins with switch type
(Please help)
2 Comments
Geoff Hayes
on 24 May 2018
Miles - please clarify what you mean by I have tried to create a button to complete... When I run the attached code (which I'm assuming you've integrated Jean-Pascal's code into), then I can easily move the plots around. Are you saying that you get an error when you run the attached code?
I'm using MATLAB r2014a. Which version are you using?
Miles Burrage
on 24 May 2018
Accepted Answer
More Answers (0)
Categories
Find more on Interactive Control and Callbacks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!