|
From: Petr M. <mi...@ph...> - 2009-03-26 07:58:36
|
> Would it be possible to add the ability recieve output from gnuplot, over > stdout to enable command driven bi-directional communication with gnuplot. > That way a program could start an embedded gnuplot process and monitor the > processes input and outpout streams to do bi-directional communication. This is possible and e.g. Octave is using this mechanism. For more information, see http://gnuplot.sourceforge.net/links.html => Programming interfaces – bidirectional interaction > Specifically I would want to be able to use this text output pipe mechanism > to: > > 1) get the region displayed by the graph, after the user has finished > interactively zooming and panning. (get_xxx) I would recommend to let the user do the zooming and press Enter when he is finished ... because then you can use pause mouse key until MOUSE_CHAR is Enter (or Escape) character. > 2) to be able to set when the user can interact with gnuplot or not i.e. > toggle interaction mode. {un}set mouse > 3) to be able to be able to put gnuplot in a mode which allows the user to > toggle the addition and removal of new data points and to output point_added > and point_removed notifications. That's not task of gnuplot but of the driving application. You can do pause mouse key and then read MOUSE_CHAR, MOUSE_X, MOUSE_Y (see "show var all"), remove/add the point, and replot. --- PM |