|
From: Arnd B. <arn...@we...> - 2004-01-09 09:40:56
|
Hi,
sorry for creating confusion, both machines now behave the same way.
(It seems that my first checkout from CVS still contained the old
version. To check on the other machine I did another checkout
a couple of hours later ... - mea culpa, I should have thought
about the sourceforge delay ;-)
To summarize:
- pasting works
- piping works
However, I observe the following (small) glitch:
Again pasting the following
plot sin(x)
set out "t1.ps"
set term post
rep
set term x11
set out
After this the mouse coordinates in the plot window
are not updated anymore. After pressing
"b" or "7" (`builtin-toggle-ratio`) or zooming
it works again.
And now for something related ;-):
To make me fully happy I would like to ask if someone
has an idea on the following:
I would like to do something like this
#####################################
from GnuplotBiDir import Gnuplot
gp=Gnuplot()
gp("set mouse") # activate mouse
gp("plot sin(x)")
print "Now get coordinates of a mouse-click:"
gp("pause mouse 'click with mouse' ")
#raw_input("and press enter here after that")
mouse_x=gp.getvar("MOUSE_X")
mouse_y=gp.getvar("MOUSE_Y")
print mouse_x,mouse_y
######################################
Here gp("...") sends the string to gnuplot via a pipe.
and gp.getvar("variable") fetches the variable given as argument.
Of course, this cannot work as the calling program does not
wait for the mouse-click. Uncommenting the raw_input
allows for the expected behaviour, but one has to press
enter after the mouse-click.
Is there a better way for doing this ?
Again many thanks,
Arnd
|