help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem while using waitforbuttonpress function


From: Tatsuro MATSUOKA
Subject: Re: Problem while using waitforbuttonpress function
Date: Mon, 7 Jun 2010 07:58:58 +0900 (JST)

Hello
> 
> Hi Tatsuro,
> I tried the command:
> 
>  figure(); 
> 
> followed by 
>  [x,y,r]= ginput(1)
> 
> it works!
> Through it I can "discriminate" if a mouse or a keyboard event happened.
> I was sure that ginput was ok only for mouse events, but the r parameter
> tell me what happens in detail (as I expected to do waitforbuttonpress).
> You solved my problem thanks a lot.

Excuse me for my writing is not comprehensive.

octave:2>  fplot ("cos", [0, 2*pi])
octave:3> a=waitforbuttonpress # mouse button press
a = 0
octave:2>  fplot ("cos", [0, 2*pi])
octave:3> a=waitforbuttonpress #keyboard press
a = 1

After simply figure() command, waitforbuttonpress command seems not to work 
correctly for octave for
windows. In the windows, perhaps something need to be  plotted.
--- Giox79 <address@hidden> wrote:

> 
> A last note: I tried 
> using ginput in the following way (see 2 posts ago):
> 
> subplot(2,1,1);
> fplot("sin",[0;2*pi]);
> subplot(2,1,2);
> fplot("cos",[0;2*pi]);
> [x,y,r] = ginput(1)
> 
> and still it doesn't work (nor waitforbuttonpress).

Unfortunately the above does not work because of limitation of gnuplot backend.
If one use subplot, the  gnuplot will be in the multiplot mode('multiplot' is a 
term of gnuplot
but not octave).  In the multiplot mode, no mouse operations and keyboard 
operations are active.  Thus
If you use subplot, ginput and waitforbuttonpress never work.

Unfortunately this is the limitation of the current octave.

Regards

Tatsuro
 

--------------------------------------
2010 FIFA World Cup News [Yahoo!Sports/sportsnavi]
http://pr.mail.yahoo.co.jp/southafrica2010/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]