12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Figure PropertiesIf a figure contains no axes, get(gcf,'CurrentAxes') returns the emptymatrix. Note that the gca function actually creates an axes if one does not exist.CurrentCharacter single character (read only)Last key pressed. <strong>MATLAB</strong> sets this property to the last key pressed in thefigure window. CurrentCharacter is useful for obtaining user input.CurrentMenu (Obsolete)This property produces a warning message when queried. It has beensuperseded by the root CallbackObject property.CurrentObject object handleHandle of current object. <strong>MATLAB</strong> sets this property to the handle of the objectthat is under the current point (see the CurrentPoint property). This object isthe front-most object in the stacking order. You can use this property todetermine which object a user has selected. The function gco provides aconvenient way to retrieve the CurrentObject of the CurrentFigure.CurrentPoint two-element vector: [x-coordinate, y-coordinate]Location of last button click in this figure. <strong>MATLAB</strong> sets this property to thelocation of the pointer at the time of the most recent mouse button press.<strong>MATLAB</strong> updates this property whenever you press the mouse button whilethe pointer is in the figure window.In addition, <strong>MATLAB</strong> updates CurrentPoint before executing callbackroutines defined for the figure WindowButtonMotionFcn andWindowButtonUpFcn properties. This enables you to query CurrentPoint fromthese callback routines. It behaves like this:• If there is no callback routine defined for the WindowButtonMotionFcn or theWindowButtonUpFcn, then <strong>MATLAB</strong> updates the CurrentPoint only whenthe mouse button is pressed down within the figure window.• If there is a callback routine defined for the WindowButtonMotionFcn, then<strong>MATLAB</strong> updates the CurrentPoint just before executing the callback. Notethat the WindowButtonMotionFcn executes only within the figure windowunless the mouse button is pressed down within the window and then helddown while the pointer is moved around the screen. In this case, the routine2-171

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!