Ginput pointer obscured in Online MATLAB

4 visualizaciones (últimos 30 días)
Jurgens Wolfaardt
Jurgens Wolfaardt el 29 de Nov. de 2018
Editada: Jurgens Wolfaardt el 25 de Sept. de 2019
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 comentarios
Walter Roberson
Walter Roberson el 25 de Sept. de 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 el 25 de Sept. de 2019
Editada: Jurgens Wolfaardt el 25 de Sept. de 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)

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Data Exploration en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by