11-02-2010 03:05 PM - edited 11-02-2010 03:05 PM
Hello everyone.
I am using labview 8.6 and i have a small problem:
I need to add two vertical lines at x = ?
x1 and x2 will be controlled by numeric control. So i can be able to move the lines left and right ( both of them).
The problem is i already have xy graph with 2 functions going in.
11-02-2010 03:22 PM
Add an additional plot for each vertical line you want to draw. This plot is composed of exactly two points: (x, ymax) and (x, ymin). I have found that drawing vertical lines using plots is more flexible and has much better performance than Cursors or Annotations.
11-02-2010 03:34 PM
Could you show me an example ? Because i dont really understand how to do it.
Thank you for quick response
11-02-2010 03:36 PM
Before we go further: what's your goal for these two vertical lines? Cursors may be a better fit for your app - do you know how to show two cursors?
11-02-2010 03:43 PM
I have two functions on this graph:
Y=x^2+5x
Z=3-x^2
I am finding area under the curve of each function and then subtracting them. Part of the lab is to set bounding limits x1 and x2. My VI already does all the calculations but i want to visually show the bounding limit and thats where those two lines come in.
I am not sure if i explained it well. Basically those lines are equal to x=x1, x=x2 they are for the user to see where the bounding limit is.
11-02-2010 03:49 PM
In that case, there's a more clever way to visually display area under curves: introduce a new curve that traces exactly one of the two existing curves over the x bounds you want, and have it fill up/down to the other curve. Since this is part of an academic lab, it will be a good exercise to scour the forums and find the method to accomplish this. Good luck!
11-02-2010 03:52 PM
I understand there is easier way but this lab is based on numerical integration with Riemann sums(left,midpoint,right).
Everything is working fine i just want to add x=x1 and x=x2 lines to the graph.
Any ideas?
11-02-2010 03:52 PM
I understand there is easier way but this lab is based on numerical integration with Riemann sums(left,midpoint,right).
Everything is working fine i just want to add x=x1 and x=x2 lines to the graph.
Any ideas?
11-02-2010 05:40 PM
I tend to use cursors for that.
Note: In the example you can move the lines to set the x values.