LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set a region in a CWGraph ?

I use CVI only no VB

lets say that you have a plot with values from 0 to 100 in a CWGraph (ActiveX control) is it possible to display in blue all the data that are from 90 to 100 ?, and to keep them highlighted even if you use a Zoom or any other feature. If someone have an example...
0 Kudos
Message 1 of 2
(2,880 Views)
In order to change the color of the same line in a graph, you will actually have to graph a segment of the line for each different color.

For instance, if you want to graph values of 0-90 in blue, you would use a Plot function with the x values ranging from 0-90 and the corresponding y values. In another posting you said you were using PlotXvsY, so the xdata parameter would have the values from 0 to 90 and the ydata parameter would have the y data.

Then change the plot color and call PlotXvsY again and plot with the xdata parameter with data contents from 91 to 100 and ydata would have the y values for those x data points.

For multiple lines on a graph, you would just repeat the process for each line and each color segment.

Hope that helps!
Shannon R
.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,880 Views)