09-02-2016 10:45 AM
I have been trying to figure this out, but to no avail. Here is what I would like to do:
I use the cursors on an XY plot to read out the information only between the cursors for further data processing (done with property nodes and a basic sub-VI I wrote to print the array of points between the cursors). This works great. What I would like to do (i.e. my boss ) is to have the color of the line between the cursors change to a different color than the rest of the data trace. I tried a few property node things but nothing worked. Anyone have a suggestion (if this is even possible)? Thanks in advance.
Solved! Go to Solution.
09-02-2016 11:00 AM
Since you have already retrieved the data of interest, the hard part is done.
You will now have to split the existing plot into two unique plots.
The first will have as many points as the full data set but all of the points that are not inbetween the cursors will be replaced with "NaN" so that they do not plot.
The second will be similar but the values of interest will be replaced by NaN.
When both are plotted using diffrent colors you will get what you want.
You may have ot fidle a bit at the edges if the boss wants it to look like the plot connects and keep in mind the first plot is "on top".
Ben
09-02-2016 11:11 AM
Hi Ben,
Thanks for your note; logically, what you said makes perfect sense. As I am unfamiliar with splitting a plot, can you proivde some basic steps for doing this or a resource so that I can go take a look? Thanks in advance.
09-02-2016 11:18 AM
Use the total length of your array to init two arrys of NAN that you put in two shift registers of a For loop.
Pas in the arry of your plot and compare the "i" terminal to decide if the current value goes in the "highlighted plot" or the other.
That compare controls a Case structure that does a "replace array subset" of either the "highlighted on other array.
After the For loop is done, you should have two arrays ready for you to plot as you did the original.
Try coding it up. Try out your code in "execution highlighting mode" (turn on the light bulb) and watch it go.
have fun!
Ben