LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I plot a graph in the specific interval?

Solved!
Go to solution

I have two graphs. I want to plot the second graph only in the specific x interval between two cursors on the first graph. Could you give an idea about how can I implement this? 

0 Kudos
Message 1 of 5
(1,922 Views)

It sounds like an XY graph would be the easiest. You can set the x-axis max and min, chop off points from your data, or set the Y-values to "NaN" for the data you don't want to plot.

 

 

0 Kudos
Message 2 of 5
(1,893 Views)

The main difficulty is that xmin and xmax should remain the same. Here is the picture of what it should look like. As you can see, xmin=0, xmax=100 and the graph is only plotted between 23 and 82. With x<23 and x>82 nothing is plotted but there is still the space. If you understood me correctly, then could you clarify a little bit? Where can I find these settings where I can set Y-value to NaN?

0 Kudos
Message 3 of 5
(1,880 Views)
Solution
Accepted by topic author LeonidLeites

Setting a value to NaN should not be done with a property node. You can use "replace array subset" in a loop to replace multiple elements of your data array. 

You'll have to attach your VI to get help on where exactly to do that. If you save for LV 2016 or lower using "save for previous version" I can take a look at it.

0 Kudos
Message 4 of 5
(1,865 Views)

Thank you a lot for your advice! It took me a lot of time finally solve this problem, but I did it successully 🙂

Message 5 of 5
(1,808 Views)