Ginput pointer obscured in Online MATLAB

조회 수: 6 (최근 30일)
Jurgens Wolfaardt
Jurgens Wolfaardt 2018년 11월 29일
편집: Jurgens Wolfaardt 2019년 9월 25일
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