LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding vertical lines at x= ?

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.

functions.JPG

 

 

0 Kudos
Message 1 of 9
(3,712 Views)

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.

0 Kudos
Message 2 of 9
(3,697 Views)

Could you show me an example ? Because i dont really understand how to do it.

 

Thank you for quick response

0 Kudos
Message 3 of 9
(3,687 Views)

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?

0 Kudos
Message 4 of 9
(3,685 Views)

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.

 

0 Kudos
Message 5 of 9
(3,678 Views)

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! Smiley Happy

0 Kudos
Message 6 of 9
(3,671 Views)

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?

0 Kudos
Message 7 of 9
(3,669 Views)

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?

0 Kudos
Message 8 of 9
(3,669 Views)

I tend to use cursors for that.

 

Note: In the example you can move the lines to set the x values.

0 Kudos
Message 9 of 9
(3,645 Views)