Trace the Position of Cursor without Click

Version 1.1.0.0 (941 Bytes) by Kang Zhao
It works like GINPUT provided by MATLAB,but traces the position of cursor without click ...
7.7K Downloads
Updated 15 Nov 2008

No License

function [x,y]=gpos(h_axes)
%GPOS Get current position of cusor and return its coordinates in axes with handle h_axes
% h_axes - handle of specified axes
% [x,y] - cursor coordinates in axes h_aexs
%
% -------------------------------------------------------------------------
% Note:
% 1. This function should be called in the figure callback WindowButtonMotionFcn.
% 2. It works like GINPUT provided by Matlab,but it traces the position
% of cursor without click and is designed for 2-D axes.
% 3. It can also work even the units of figure and axes are inconsistent,
% or the direction of axes is reversed.
% -------------------------------------------------------------------------

Cite As

Kang Zhao (2024). Trace the Position of Cursor without Click (https://www.mathworks.com/matlabcentral/fileexchange/4170-trace-the-position-of-cursor-without-click), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Visual Exploration in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.1.0.0

bug fix

1.0.0.0