Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why the interactive mode of my gnuplot installation won't rotate when it will for batch.dem files and also for Octave

I have gnuplot 4.6 working on Mac OS X. It works from Octave as well. This isn't an octave related question, just trying to convince you that gnuplot seems to be installed fine. My problem is that while I CAN rotate plots with the mouse (am using x11 as the plotting window) in a batch sort of mode (e.g. $unixPrompt> gnuplot pm3d.dem works fine: I can rotate/zoom them), and ALSO can rotate 3d plots created from within Octave, but I CANNOT just go into gnuplot and rotate any such plot from the interactive gnuplot program. ie. gnuplot> issuePlotCommands… will put up the plot just fine, but I cannot then rotate that plot like I can do when I've issued the same commands in a batch or Octave-driven manner. My interactive gnuplot seems to allow no mouse input whatsoever. I currently have GNUTERM=x11 in my .profile. Can anyone point out why the interactive mode of my gnuplot installation won't rotate when it will for batch.dem fils and also for Octave? Thanks.

like image 779
werdevo Avatar asked May 04 '12 19:05

werdevo


2 Answers

Type in pause -1. That enabled rotation for me!

like image 59
Karl Avatar answered Nov 10 '22 03:11

Karl


does adding set mouse make any difference?

(from the gnuplot doc)

The command `set mouse` enables mouse actions. Currently the pm, x11, ggi,
windows and wxt terminals are mouse enhanced. There are two mouse modes. The
2d-graph mode works for 2d graphs and for maps (i.e. splots with `set view`
having z-rotation 0, 90, 180, 270 or 360 degrees, including `set view map`)
and it allows tracing the position over graph, zooming, annotating graph etc.
For 3d graphs `splot`, the view and scaling of the graph can be changed with
mouse buttons 1 and 2. If additionally to these buttons the modifier <ctrl> is
hold down, the coordinate system only is rotated which is useful for large
data sets. A vertical motion of Button 2 with the shift key hold down changes
the `xyplane`.

Notice that the following will work:

echo "plot sin(x); pause mouse keypress" | gnuplot -persist

but this won't:

echo "plot sin(x)" | gnuplot -persist

since the gnuplot process must be alive for the gnuplot_x11 driver to talk to for the rotating.

like image 30
mgilson Avatar answered Nov 10 '22 04:11

mgilson