Ginput pointer obscured in Online MATLAB

5 次查看(过去 30 天)
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 个评论
Walter Roberson
Walter Roberson 2019-9-25
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 2019-9-25
编辑:Jurgens Wolfaardt 2019-9-25
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)

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Exploration 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by