|
From: Ethan A M. <merritt@u.washington.edu> - 2008-03-23 17:10:29
|
On Sunday 23 March 2008 08:15, Rex Walburn wrote: > Hi > > I am trying to do this. The user plots any complicated curve. > Then the user clicks at one point (x1,y1) on the graph plot and stores the > value of MOUSE_X and MOUSE_Y in variables x_1 and y_1. > Then the user clicks at another point (x2,y2) on the graph plot and stores > the value of MOUSE_X and MOUSE_Y in variables x_2 and y_2. > > I am trying to draw a line segment between the points (x_1,y_1) and > (x_2,y_2). set arrow N from x_1,y_1 to x_2,y_2 nohead replot > Is there anyway to do this from the commandline without having to dump the > values of (x_1,y_1) and (x_2,y_2) into a text file in column format and then > re-read it in gnuplot. > I wrote a function my_line(x) = y_1 + ((y_2 - y_1)/(x_2 - x_1))*x and tried > plotting it but it keeps giving me "all points y value undefined!" error. > > How do I do this ? > > Any help will be appreciated. > > Thanks > RW > -- Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle 98195-7742 |