help-octave
[Top][All Lists]
Advanced

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

Re: ginput with Octave 3.2 is SLOOOOOOWWWW on Windows


From: Tatsuro MATSUOKA
Subject: Re: ginput with Octave 3.2 is SLOOOOOOWWWW on Windows
Date: Thu, 18 Feb 2010 19:10:22 +0900 (JST)

Hello

Sorry, I first submit backward saying for the ginput problem.
*********************
I cannot use ginput on octave 3.2.3
First I fixed  __go_draw_figure__.m in 
....\Octave\3.2.3_gcc4.4.0\share\octave\3.2.3\m\plot
according to
http://hg.savannah.gnu.org/hgweb/octave/rev/fea3d4868692

However, I have modified the above, it does not work with the waring
octave:1> putenv("GNUTERM","wxt")
octave:2> plot (1:10)
octave:3> [x,y,b] = ginput(1)
warning: implicit conversion from real matrix to real scalar
warning: implicit conversion from real matrix to real scalar
warning: implicit conversion from real matrix to real scalar
warning: implicit conversion from real matrix to real scalar
warning: implicit conversion from real matrix to real scalar
warning: implicit conversion from real matrix to real scalar 

Have to I modify any others for octave-3.2.3 ?

However, octave-3.2.4 built myself with the instruction by me, it worked 
correct.
octave:1>  putenv("GNUTERM","wxt")
octave:2> plot(1:10)
octave:3> [x,y,b] = ginput(1)
x =  4.4521
y =  4.4061
b =  1

The recent cvs version gnuplot.exe for windows which is distributed the below, 
in which, the pause
mouse bug of gnuplot.exe is fixed.
http://www.tatsuromatsuoka.com/gnuplot/Eng/winbin/

With it, ginput also works correct 
***********************


As Matthias said, the ginput is slow. It take several seconds.
On octave-3.2.4 on cygwin, ginput responds immediately.   

> http://old.nabble.com/Plotting-with-3.2.0-on-Windows-is-SLOOOOOOWWWW-td24703690.html
>  .

What Matthias said is right.

If the task priority of the gnuplot executed from raised by one rank by the 
task manager.
ginput works immediately.

Therefore I add sleep(0.05) in the __gnuplot_ginput__.m as

--- __gnuplot_ginput__.m.orig   2010-02-17 15:02:52 +0900
+++ __gnuplot_ginput__.m        2010-02-18 19:08:28 +0900
@@ -76,7 +76,7 @@
     k = 0;
     while (true)
       k++;
-
+      sleep(0.05); # sleep a moment is required for windows
       ## Notes: MOUSE_* can be undefined if user closes gnuplot by "q"
       ## or Alt-F4. Further, this abrupt close also requires the leading
       ## "\n" on the next line.

The above makes ginput respond as expected.

Regards

Tatsuro

 


--- Matthias Brennwald  wrote:

> Dear all
> 
> The ginput() function is very slow on my Windows XP machines. On Mac OS X or 
> Linux, ginput(1)
> returns immediately after clicking on a plot. On Windows, however, it takes 
> several seconds to
> return after a click (Octave 3.2 with gnuplot, using the "stock" ginput, not 
> the one from the
> plot package available at Octave-Forge). This makes using ginput() 
> impractical, especially in
> situations where several clicks are required. I suspect the slowness has to 
> do with the
> Octave/gnuplot interaction and it somehow reminds me of this thread:
> http://old.nabble.com/Plotting-with-3.2.0-on-Windows-is-SLOOOOOOWWWW-td24703690.html
>  .
> 
> Is there a fix or workaround to the ginput slowness?
> 
> Matthias
> 
> ----
> Matthias Brennwald, K将」ferholzstrasse 173, CH-8046 Z将舐ich, +41 44 364 17 03
> 
> 
> 


--------------------------------------
VANCOUVER 2010 Olympic News [Yahoo! Sports/sportsnavi]
http://pr.mail.yahoo.co.jp/olympic/


reply via email to

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