|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
interactively modifying a "1d" plot with the mouse?Hi all, I am trying to find a way to modify the plot of a monodimensional array, using the mouse. Basically I need to be able to drag my mouse over the plotted function and when I click and drag a point in the curve, that point would move and modify the curve accordingly. The result of the modifed curve should be returned as an array. What would be the easiest way of acheiving this? Is there any octave GUI module that already does something similar? Should I learn openGL and write a .oct for that? What would be the best approach? I am running octave 3.0.1 under OS X 10.4.11 and aquaterm 1.0.1 Thanks and happy new year, Baba |
|
|
Re: interactively modifying a "1d" plot with the mouse?On Jan 5, 2009, at 11:24 PM, roumba wrote:
> Hi all, > > I am trying to find a way to modify the plot of a monodimensional > array, > using the mouse. > Basically I need to be able to drag my mouse over the plotted > function and > when I click and drag a point in the curve, that point would move > and modify > the curve accordingly. The result of the modifed curve should be > returned as > an array. > What would be the easiest way of acheiving this? Is there any > octave GUI > module that already does something similar? Should I learn openGL > and write > a .oct for that? What would be the best approach? > > I am running octave 3.0.1 under OS X 10.4.11 and aquaterm 1.0.1 I think that Octave sends plotting output to gnuplot, aquaterm, and the other plotting backends, but does not read from them. You can sort of do this if you plot using gnuplot and x11. With an x11 plot the coordinates of the mouse pointer appear at the bottom of the plot. You can middle-click or option-click to mark a point on the plot, and double-click to copy the coordinates of the point to the x11 clipboard. To copy the x11 clipboard to the OSX clipboard, press apple-C. So, you can get the coordinates of a point with the mouse, but perhaps not in a straightforward way. I can imagine a script to identify and update a point in an array based on this sort of input, but not with any elegance. Cheers, Rob -- Rob Mahurin Department of Physics and Astronomy University of Tennessee 865 207 2594 Knoxville, TN 37996 rob@... _______________________________________________ Help-octave mailing list Help-octave@... https://www-old.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: interactively modifying a "1d" plot with the mouse?>I think that Octave sends plotting output to gnuplot, aquaterm, and
>the other plotting backends, but does not read from them. In fact, the ginput() function return the coordinates of the point where the mouse is clicked. One could write a function using that input to modify the data... -- Francesco Potortì (ricercatore) Voice: +39 050 315 3058 (op.2111) ISTI - Area della ricerca CNR Fax: +39 050 315 2040 via G. Moruzzi 1, I-56124 Pisa Email: Potorti@... (entrance 20, 1st floor, room C71) Web: http://fly.isti.cnr.it/ _______________________________________________ Help-octave mailing list Help-octave@... https://www-old.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: interactively modifying a "1d" plot with the mouse?On 8-Jan-2009, Francesco Potortì wrote:
| >I think that Octave sends plotting output to gnuplot, aquaterm, and | >the other plotting backends, but does not read from them. | | In fact, the ginput() function return the coordinates of the point where | the mouse is clicked. One could write a function using that input to | modify the data... The ginput function is a bit of a kluge. It doesn't work when using gnuplot with Octave on Windows, for example. I don't think we will have any really good solutions for interactive graphics as long as we are using gnuplot to do the rendering. Or at least not unless someone improves gnuplot so that it is easier to get data back from it in a portable way. jwe _______________________________________________ Help-octave mailing list Help-octave@... https://www-old.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: interactively modifying a "1d" plot with the mouse?On Thu, Jan 8, 2009 at 3:31 AM, John W. Eaton <jwe@...> wrote:
> On 8-Jan-2009, Francesco Potortì wrote: > > | >I think that Octave sends plotting output to gnuplot, aquaterm, and > | >the other plotting backends, but does not read from them. > | > | In fact, the ginput() function return the coordinates of the point where > | the mouse is clicked. One could write a function using that input to > | modify the data... > > The ginput function is a bit of a kluge. It doesn't work when using > gnuplot with Octave on Windows, for example. IIRC, it used to work under Windows as well. At least with the development code. I don't remember if it worked for the 3.0.x branch. Michael. _______________________________________________ Help-octave mailing list Help-octave@... https://www-old.cae.wisc.edu/mailman/listinfo/help-octave |
| Free embeddable forum powered by Nabble | Forum Help |