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: Giox79
Subject: Re: Problem while using waitforbuttonpress function
Date: Sat, 5 Jun 2010 05:59:06 -0700 (PDT)

Thanks a lot,
well I tried the suggested approach, the ginput(1) approach works fine, but
wasn't good for me since it was quite slow and furthermore I have to wait
for a specific keyboard character.
However  modifying the 

__gnuplot_ginput__.m

file does the right work!
I don't understand why, but it works faster, when waiting for a button press
on a fplot window.
A last question: in my original application I have to create two different
subplots, in a command like the following one:

subplot(2,1,1);
fplot ("cos", [0, 2*pi])   // In my application I show a BW image loaded
from file on hard disk
subplot(2,1,2);
fplot ("sin", [0, 2*pi])   // In my application I show a mean fft of the BW
image
a=waitforbuttonpress()


However I think this lines of code implicitly call a figure() command since
the waitforbuttonpress doesn't work.
Do you have any idea? Thanks a lot for your really useful help.

Giovanni


Tatsuro MATSUOKA-2 wrote:
> 
> Hello
> 
> --- Giox79  wrote:
> 
>> 
>> Thanks for your help.
>> I checked the suggested link, and I tried installing Octave in a
>> different
>> PC (Windows XP, Octave 3.2.4, BUT WITHOUT ANY OCTAVE FORGE PACKAGE) and I
>> have the same problem, 
>> 
>> A=waitforbuttonpress()
>> 
>> doesn't react.
>> 
>> Then I installed Octave 3.2 on Ubuntu 9, and over there everything works
>> fine: as soon as I press a key in the window generated by the Przemek
>> Klosowski.
>> 
>> figure()
>> 
>> command, the 
>> 
>> A=waitforbuttonpress();
> 
> I have confirmed
> octave:18> figure
> octave:19> a=waitforbuttonpress()
> 
> does not react, 
> On octave on the cygwin it works as  expected
> 
> However,
> octave:19> fplot ("cos", [0, 2*pi])
> octave:20> a=waitforbuttonpress()
> a = 0
> octave:21> a=waitforbuttonpress()
> a =  1
> 
> works as expected.
> I cannot figure out the reason the above but something may be different in
> gnuplot response between
> x11 and windows.
> 
> BTW, did you try a=ginput(1) on octave for windows with graph plotted (not
> figure() after figure)?
> 
> Does the a=ginput(1) react immediately?
> If not, please try
> 
> http://old.nabble.com/ginput-on-Octave-3.2.4-mingw32-to28093888.html
> (You may alreay read the above.)
> 
> Regards
> 
> Tatsuro 
> 
> --------------------------------------
> 2010 FIFA World Cup News [Yahoo!Sports/sportsnavi]
> http://pr.mail.yahoo.co.jp/southafrica2010/
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
> 
> 
-- 
View this message in context: 
http://octave.1599824.n4.nabble.com/Problem-while-using-waitforbuttonpress-function-tp2241404p2244219.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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