Effacer les filtres
Effacer les filtres

Ginput pointer obscured in Online MATLAB

10 vues (au cours des 30 derniers jours)
Jurgens Wolfaardt
Jurgens Wolfaardt le 29 Nov 2018
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 commentaires
Walter Roberson
Walter Roberson le 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 le 25 Sep 2019
Modifié(e) : Jurgens Wolfaardt le 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)

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by