0

I have a plot of distance vs. time for a large set of data. I want to draw a line, say, parallel to x-axis at a distance 2.00 (in some scale) i.e. need to add another plot of y =2. Any help might be useful;I did it by transferring the plot in another program but I want to stick in xmgrace.

Mahendra Thapa
  • 163
  • 2
  • 4
  • 12

1 Answers1

3

You can do this easily by creating a new data set based on the equation y = 2.

From the Edit menu:

Edit > Data Sets

Now in the "Data Set Properties" window:

Edit > Create New > By Formula

Now you have to define a formula. Since you want a straight line you only need two points that correspond to the equation y = 2 and that sit at the extrema of your desired plot range. I suggest the following parameters:

"Start at" = 0
"Stop at" = <the final time of your data set>
"Length" = 2
"Set type" = "XY"
X = $t
Y = 2
feedMe
  • 3,431
  • 2
  • 36
  • 61