Contents     Functions         Previous Next     PDF Index



Mouse related callbacks for GUI figures.




iimouse is the general function used by feplot and iiplot to handle graphical inputs. While it is designed for SDT generated figures, iimouse can be used with any figure (make the figure active and type iimouse).

The main mouse mode is linked supports zooming and axis/object selection (see zoom). Context menus are associated to many objects and allow typical modifications of each object. When an axis is selected (when you pressed a button while your mouse was over it), iimouse reacts to a number of keys (see key). An active cursor mode (see Cursor) has replaced the information part of previous versions of iimouse. 3-D orientation is handled by view commands.


iimouse with no argument (which is the same as iimouse('on')) turn zoom, key and context menu on.

In detail, the figure is made Interruptible, WindowButtonDownFcn is set to iimouse('zoom') and KeyPressFcn to iimouse('key')).

Plot functions (iiplot, feplot) start iimouse automatically.

iimouse off turns all iimouse callbacks off.

clip [Start,Undo]

This command is used to eliminate faces not contained within the area that the user selects with a dragging box. ClipUndo clears the current axis and calls feplot to reinitialize the plot.


This is basic mode of iimouse, it supports

Context menus are described in section 2.1.1 and section 4.4.1.


When you start the cursor mode (using the context menu opened with the right mouse button or by typing the c key), you obtain a red pointer that follows your mouse while displaying information about the object that you are pointing at. You can stop the cursor mode by clicking in the figure with your right mouse button or the c key. The object information area can be hidden by clicking on it with the right mouse button.

For feplot figures, additional information about the elements linked to the current point can be obtained in the MATLAB command window by clicking in the figure with the left button. By default, the cursor follows nodes of the first object in the feplot drawing axis. If you click on another object, the cursor starts pointing at it. In the wire-frame representation, particularly when using OpenGL rendering, it may be difficult to change object, the n key thus forces the cursor to point to the next object.

For iiplot axes, the cursor is a vertical line with circles on each data set and the information shows the associated data sets and values currently pointed at.

For ii_mac axes the current value of the MAC is shown.


Keyboard short-cuts. Some commands are directly available by pressing specific keys when a plot axis is active (to make it active just click on it with your mouse). The short cuts are activated by setting the KeyPressFcn to iimouse('key') (this is done by iimouse on). Short cuts are:

a,Aall axis shrink/expandu,U10o horizontal rotation
cstart iimouse cursorv,V10o vertical rotation
ireturn to initial axis limitsw,W10o line of sight 10o rotation
l,Lsmaller/larger fecom scaledefx,Xx/horizontal translation
ncursor on next fecom objecty,Yy/vertical translation
  z,Zz/line of sight translation
-,_previous (iicom ch-)+,=next (iicom ch+)
1,2,3,4see view commands?list keyboard shortcuts

The list of the associated call is accessible using the call
sdt_table_generation('KeyPressTable.feplot') or

For feplot axes the translations are based on camera movements and correspond to the horizontal, vertical and line of sight for the current view. Translating along the line of sight has no effect without perspective and is similar to zooming with it. For other axes, the xyz keys translate along the data xyz directions.


The object that you decided to move (axes and text objects) follows your mouse until you click on a final desired position. This mode is used for triax (created by feplot) and colorbar axes, as well as text objects when you start move using the context menu (right button click to open this menu).

The moveaxis used for legend as a slightly different behavior. It typically moves the axis while you keep the button pressed.

You can call move yourself with iimouse('move',Handle) where Handle must be a valid axes or text object handle.


This series of commands supports the creation of a context menu for text objects which allows modification of font properties (it calls uisetfont), editing of the text string (it calls edtext), mouse change of the position (it calls iimouse), and deletion of the text object.

You can make your own text objects active by using iimouse('textmenu',Handle) where Handle must contain valid text object handle(s).


iimouse supports interactive changes in the 3-D perspective of axes. Object views are controlled using azimuth and elevation (which control the orientation vector linking the CameraTarget and the CameraPosition) and self rotation (which control the CameraUpVector). You can directly modify the view of the current axis using the MATLAB view and cameramenu functions but additional capabilities and automated orientation of triax axes are supported by iimouse.

1first standard view. Default n+y. Changed using the View default context menu.
2standard xy view (n+z). Similar to MATLAB view(2) with resetting of CameraUpVector. Changed using the View default context menu.
3standard view. Default to MATLAB view(3).
4standard view. Default n+x.
n[+,-][x,y,z]2-D views defined by the direction of the camera from target.
n[+,-][+,-][+,-]3-D views defined by the signs projection of line of sight vector along the xyz axes.
dn ...dn commands allow setting of default 1234 views. Thus viewdn-x will set the 4 view to a normal along negative x
az el srspecify azimuth, elevation and rotation around line of sight
g rz ry rzspecify rotations around global xyz axes
[x,y,z][+,-] angrotation increments around global xyz axes
[h,v,s][+,-] angcurrent horizontal, vertical and line of sight axes

All angles should be specified in degrees.

iimouse key supports rotations by +/- 10 degrees around the current horizontal, vertical and line of sight axes when any of the u, U, v, V, w, W keys are pressed (same as fecom('viewh-10') ...). 1, 2, 3, 4 return to basic 2-D and 3-D views.

iimouse('cv') returns current view information you can then set other axes with iimouse('view',AxesHandles,cv).

See also

iicom, fecom, iiplot

©1991-2019 by SDTools
Previous Up Next