|
From: Dmitri A. S. <dm...@un...> - 2005-07-15 05:18:26
|
Any idea why zooming with mouse does not work if I do: echo "set mouse; plot sin(x)" | gnuplot -persist ? (on linux/x86 - FC4 and FC3) The problem came about when I was trying to figure out why zooming with mouse does not work on octave on MacOSX (with X11 term). There is no problem with that on linux/x86 though... I tried both gnuplot-4 and a recent cvs snapshot. Sincerely, Dmitri. -- |
|
From: Petr M. <mi...@ph...> - 2005-07-18 12:23:54
|
> Any idea why zooming with mouse does not work if I do: > echo "set mouse; plot sin(x)" | gnuplot -persist > ? > (on linux/x86 - FC4 and FC3) See http://www.gnuplot.info/faq/faq.html#SECTION00076000000000000000 --- PM |
|
From: Theo H. <th...@ph...> - 2005-07-18 12:49:12
|
Dmitri A. Sergatskov wrote: > Any idea why zooming with mouse does not work if I do: > > echo "set mouse; plot sin(x)" | gnuplot -persist > > ? > (on linux/x86 - FC4 and FC3) > > The problem came about when I was trying to figure out why zooming > with mouse does not work on octave on MacOSX (with X11 term). > There is no problem with that on linux/x86 though... > > I tried both gnuplot-4 and a recent cvs snapshot. This is exactly the expected behaviour. gnuplot sees end of input from the pipe and quits. The x11 helper program gnuplot_x11 keeps running, as requested by -persist, but has nowhere to send the mouse events since gnuplot has finished. Hence, no mousing. Note that you get the shell command line immediately after running the above command, despite not putting gnuplot in the background, indicating that gnuplot has finished. To verify, use ps or top. THeo |
|
From: Dmitri A. S. <das...@gm...> - 2005-07-18 15:04:57
|
Theo Hopman wrote: > Dmitri A. Sergatskov wrote: > >> Any idea why zooming with mouse does not work if I do: >> >> echo "set mouse; plot sin(x)" | gnuplot -persist >> >> ? >> (on linux/x86 - FC4 and FC3) >> >> The problem came about when I was trying to figure out why zooming >> with mouse does not work on octave on MacOSX (with X11 term). >> There is no problem with that on linux/x86 though... >> >> I tried both gnuplot-4 and a recent cvs snapshot. > > > This is exactly the expected behaviour. gnuplot sees end of input from > the pipe and quits. The x11 helper program gnuplot_x11 keeps running, as > requested by -persist, but has nowhere to send the mouse events since > gnuplot has finished. Hence, no mousing. OK, here is a better test (courtesy of John Eaton): mkfifo fifo1 then in one xterm: gnuplot < fifo1 in another xterm: cat > fifo1 set mouse plot sin(x) ... This works as expected on linux/x86, linux/ppc and is not working on MacOSX/X11... (Tiger 10.4, kernel 8.2.0) (BTW, the line in FAQ that one needs to set mouse in .octaverc is probably not the best advice. I think it is better to set it in .gnuplot, this way if gnuplot restarted in the middle of the octave session it still gets mouse support.) > THeo Dmitri. -- |
|
From: Theo H. <th...@ph...> - 2005-07-18 15:51:01
|
Dmitri A. Sergatskov wrote: > Theo Hopman wrote: >> This is exactly the expected behaviour. gnuplot sees end of input from >> the pipe and quits. The x11 helper program gnuplot_x11 keeps running, >> as requested by -persist, but has nowhere to send the mouse events >> since gnuplot has finished. Hence, no mousing. > > OK, here is a better test (courtesy of John Eaton): > > mkfifo fifo1 > then in one xterm: > > gnuplot < fifo1 > > in another xterm: > > cat > fifo1 > set mouse > plot sin(x) > ... > > This works as expected on linux/x86, linux/ppc and is not working on > MacOSX/X11... (Tiger 10.4, kernel 8.2.0) I'm not sure what behaviour you're expecting, but for me this gives exactly the same results as with an unnamed pipe: there is a coordinate display, but zooming and the like are not available. I did mkfifo fifo1 gnuplot -persist < fifo1 & ps -u $USER cat << EOC > fifo1 set mouse plot sin(x) EOC ps -u $USER # note gnuplot is done but gnuplot_x11 is still running. Once again, gnuplot sees an end-of-input on the named pipe, and quits. To prevent this, you need shell trickery like the following: gnuplot <fifo1 3>fifo1 & File descriptor 3 of gnuplot is redirected to the named pipe. As long as gnuplot is running (and doesn't close file descriptor 3), it won't encounter an end-of-input on the named pipe, and won't quit. Since gnuplot is still running, mousing works. Do `echo "quit" > fifo1` or the like to make gnuplot quit. THeo (BTW: System is Fedora Core 3) |
|
From: Dmitri A. S. <das...@gm...> - 2005-07-18 17:07:58
|
Theo Hopman wrote: >> This works as expected on linux/x86, linux/ppc and is not working on >> MacOSX/X11... (Tiger 10.4, kernel 8.2.0) > > I'm not sure what behaviour you're expecting, but for me this gives > exactly the same results as with an unnamed pipe: there is a coordinate > display, but zooming and the like are not available. I did > .... > > THeo > > (BTW: System is Fedora Core 3) > I guess I confused everyone with my first post. The issue I am trying to solve is that I cannot get mouse to work in octave (which uses gnuplot as a plotting back end) on MacOSX (Tiger, kernel 8.2.0 <-- this might be important, since people with 8.1.0 does not seem to have this problem). So, I reduced the problem to a simple case of gnuplot being controlled via pipe. On linux/x86 and on linux/ppc (FC4 in both cases) this works the same way as if gnuplot run "normally" (except that I have to set mouse explicitly). In MacOS X I cannot get mouse to work at all when gnuplot is controlled through a pipe. I am not really a Mac OS X expert, so any advice would be appreciated. In particular, I would like to hear from anyone who has a similar setup and who can or cannot reproduce the problem. I also open to suggestion on what kind of testing and debugging I can do. Sincerely, Dmitri. -- |
|
From: Theo H. <th...@ph...> - 2005-07-18 18:02:35
|
Dmitri A. Sergatskov wrote: > I guess I confused everyone with my first post. The issue I am trying to > solve is > that I cannot get mouse to work in octave (which uses gnuplot as a plotting > back end) on MacOSX (Tiger, kernel 8.2.0 <-- this might be important, since > people with 8.1.0 does not seem to have this problem). > So, I reduced the problem to a simple case of gnuplot being controlled > via pipe. > On linux/x86 and on linux/ppc (FC4 in both cases) this works the same way > as if gnuplot run "normally" (except that I have to set mouse explicitly). > In MacOS X I cannot get mouse to work at all when gnuplot is controlled > through > a pipe. My confusion arises from the fact that in the examples you give, mousing is not expected to work. Note that when I say "mousing", I refer to the the full functionality described by the help given when 'h' is pressed in the gnuplot_x11 window. This includes zooming, labelling, and toggling of logarithmic axes and of grids. The display of the coordinates of the mouse cursor is generated by gnuplot_x11 itself, and does not require that gnuplot be running. THeo |
|
From: Dmitri A. S. <das...@gm...> - 2005-07-18 19:16:20
|
Theo Hopman wrote: > > > My confusion arises from the fact that in the examples you give, mousing > is not expected to work. Note that when I say "mousing", I refer to the May be in the first example (with -persist -- I misunderstood what this does). In the second example: gnuplot < fifo1 cat > fifo1 mousing works to full extend on linux (grid, logscale, help, zooming)... None of those works on Mac OS X. > THeo > Regards, Dmitri. -- |