mkdraggable(h,[motionfcn],[constraint],[p],[turnOff])
Make it so that a graphics object can be dragged in a figure. This function makes an object interactive by allowing it to be dragged across a set of axes, following or not certain constraints. This allows for intuitive control elements which are not buttons or other standard GUI objects, and which reside inside an axis. Typical use involve markers on an axis, whose position alters the output of a computation or display.
|
Parameters |
Description |
|
h [array] |
Handle or array of handles for objects to make draggable |
|
motionfcn [function handle] |
(Optional) Function to be executed while object is being dragged. |
|
constraint [string] |
(Optional) Identifier used to constrain motion. Can be one of 'n' or 'none' (the object is unconstrained (default)), 'h' or 'horizontal' (the object can only be moved horizontally), or 'v' or 'vertical' (the object can only be moved vertically) |
|
p [vector] |
(Optional) Limits to apply to the selected constraint. Defaults to the limits of the axes. |
|
turnOff [string] |
(Optional) 'Off' to turn dragging off. |
|
Copyright (c) MZA Associates 2009. All rights reserved.
|
|
What do you think about this topic? Send feedback!
|