Prev: bvpinit for bvp4c
Next: Piecewise function handle
From: Thomas Dickinson on 31 Mar 2010 23:16 Hello, I'm using ginput when a GUI button is pressed. I set the current figure/axes to where they should be before calling ginput: set(0,'CurrentFigure', thePlot); set( thePlot,'CurrentAxes',theFigure); [deleteX,deleteY] = ginput(1) This works (i.e. I get the right coordinates returned when I click). However, there's a problem because the mouse cursor and ginput crosshairs become invisible when I mouse over the figure. I know the cursor isn't meant to be visible, but I thought this would be worth mentioning. It's impossible to pick the right point with no crosshairs! At least it's really hard. For some reason, you can see the crosshairs (but still no mouse) when you mouse over the legend in the figure (the legend for the axes I'm selecting from). If you have any suggestions, I would really appreciate you letting me know! Thanks
From: Abe Lau on 8 Apr 2010 23:34 "Thomas Dickinson" <geoffrey.seaborn(a)gmail.com> wrote in message <hp135k$1h0$1(a)fred.mathworks.com>... > Hello, > > I'm using ginput when a GUI button is pressed. > > I set the current figure/axes to where they should be before calling ginput: > > set(0,'CurrentFigure', thePlot); > set( thePlot,'CurrentAxes',theFigure); > > [deleteX,deleteY] = ginput(1) > > This works (i.e. I get the right coordinates returned when I click). > > However, there's a problem because the mouse cursor and ginput crosshairs become invisible when I mouse over the figure. I know the cursor isn't meant to be visible, but I thought this would be worth mentioning. It's impossible to pick the right point with no crosshairs! At least it's really hard. > > For some reason, you can see the crosshairs (but still no mouse) when you mouse over the legend in the figure (the legend for the axes I'm selecting from). > > If you have any suggestions, I would really appreciate you letting me know! > > Thanks Hi Thomas, I found similar problem where the ginput crosshairs whenever I have the color of an axes set. E.g. figure; h = imagesc(rand(100,100)); ginput(1) % this works nicely set(gca, 'Color', 'b') ginput(1) % the crosshair is gone now I am not sure why, maybe someone would be able to explain it. As a workaround, I copy and rename ginput.m to my working directory, and change the pointer type from 'fullcrosshair' to 'crosshair'. You may want to see if that works for you or not. Abe
From: TideMan on 9 Apr 2010 01:02 On Apr 9, 3:34 pm, "Abe Lau" <'myna...(a)gmail.com> wrote: > "Thomas Dickinson" <geoffrey.seab...(a)gmail.com> wrote in message <hp135k$1h...(a)fred.mathworks.com>... > > Hello, > > > I'm using ginput when a GUI button is pressed. > > > I set the current figure/axes to where they should be before calling ginput: > > > set(0,'CurrentFigure', thePlot); > > set( thePlot,'CurrentAxes',theFigure); > > > [deleteX,deleteY] = ginput(1) > > > This works (i.e. I get the right coordinates returned when I click). > > > However, there's a problem because the mouse cursor and ginput crosshairs become invisible when I mouse over the figure. I know the cursor isn't meant to be visible, but I thought this would be worth mentioning. It's impossible to pick the right point with no crosshairs! At least it's really hard. > > > For some reason, you can see the crosshairs (but still no mouse) when you mouse over the legend in the figure (the legend for the axes I'm selecting from). > > > If you have any suggestions, I would really appreciate you letting me know! > > > Thanks > > Hi Thomas, > I found similar problem where the ginput crosshairs whenever I have the color of an axes set. > > E.g. > figure; h = imagesc(rand(100,100)); > ginput(1) % this works nicely > set(gca, 'Color', 'b') > ginput(1) % the crosshair is gone now > > I am not sure why, maybe someone would be able to explain it. > > As a workaround, I copy and rename ginput.m to my working directory, and change the pointer type from 'fullcrosshair' to 'crosshair'. You may want to see if that works for you or not. > > Abe For me (using R2006a), the above works OK, but if I try to colour the axes light green colours like f0fff0 or buff colours like ffffd8, then my crosshairs almost disappear. They're still there, but very faint. One solution is to use myginput from the file exchange and specify: [x,y]=myginput(1,'crosshair');
|
Pages: 1 Prev: bvpinit for bvp4c Next: Piecewise function handle |