Ginput pointer obscured in Online MATLAB

5 views (last 30 days)
Hi All
When running 'ginput' on Online MATLAB, the pointer is obscured by a black square, covering the pixel you would be aiming for. I have tried different PCs and different Windows pointer settings without success. Any ideas please? Thanks!
  3 Comments
Walter Roberson
Walter Roberson on 25 Sep 2019
I do not see this when using it from Firefox on Mac; I get picture-spanning crosshairs. (Response to movement lags a fair bit but it does work.)
Jurgens Wolfaardt
Jurgens Wolfaardt on 25 Sep 2019
Edited: Jurgens Wolfaardt on 25 Sep 2019
Yes I did.
Ditch ginput. It is very simple to do your own.
Use:
Xin = AxesH.CurrentPoint(1,1);
Yin = AxesH.CurrentPoint(1,2);
to get your coordinates out.
Also do your own cool pointershape (to prompt the user to click and/or improve pointer shape to select data) by using:
%set up custom pointer for waypoint selection
cdata = NaN(32,32);
cdata(16,1:13) = 2*ones(1,13);
cdata(16,19:31) = 2*ones(1,13);
cdata(1:13,16) = 2*ones(13,1);
cdata(19:31,16) = 2*ones(13,1);
cdata(16,16) = 2*ones(1,1); %center dot
hotspot = [16,16];
%construct reticle for waypoint selection
reticle = [ NaN,NaN,NaN,NaN,2 ,2 ,2 ,NaN,NaN,NaN,NaN;
NaN,NaN,2 ,2 ,NaN,2 ,NaN,2 ,2 ,NaN,NaN;
NaN,2 ,NaN,NaN,NaN,NaN,NaN,NaN,NaN,2 ,NaN;
NaN,2 ,NaN,NaN,NaN,NaN,NaN,NaN,NaN,2 ,NaN;
2 ,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,2 ;
2 ,2 ,NaN,NaN,NaN,NaN,NaN,NaN,NaN,2 ,2 ;
2 ,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,2 ;
NaN,2 ,NaN,NaN,NaN,NaN,NaN,NaN,NaN,2 ,NaN;
NaN,2 ,NaN,NaN,NaN,NaN,NaN,NaN,NaN,2 ,NaN;
NaN,NaN,2 ,2 ,NaN,2 ,NaN,2 ,2 ,NaN,NaN;
NaN,NaN,NaN,NaN,2 ,2 ,2 ,NaN,NaN,NaN,NaN ];
cdata(11:21,11:21) = reticle;
set(FigureH,'Pointer','custom','PointerShapeCData',cdata,'PointerShapeHotSpot',hotspot)

Sign in to comment.

Answers (0)

Categories

Find more on Data Exploration 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!