Plotting Discontinuous Lines or Having Plot Gaps on the Measurement Studio CWGraph Control Primary Software: Measurement Studio>>Visual Basic SupportPrimary Software Version: 6.0 Primary Software Fixed Version: 6.0 Secondary Software: LabWindows/CVI Development Systems>>Full Development System
Problem: I want to create plots on the CWGraph control that have discontinuities or gaps. How do I set this up? Solution: You can plot NaN (Not A Number) values to the Graph that will show up as a discontinuity or gap on the plot. In Visual Basic 6.0, you need to define the following: To assign a NaN value to a member of the data array, use the GenerateNaN function, as shown in the following example.data(3) = GenerateNaN ' where data is an array of doublesIf you are using the CWGraph control in LabWindows/CVI, use the NotANumber function in the Programmers Toolbox to create a NaN, as shown in the following example.data[3] = NotANumber(); //where data is an array of doublesIf you are using Visual C++, you can create a NaN using std::numeric_limits, as shown in the following example.data[3] = std::numeric_limitsIf you are using the CWGraph from a .NET language via COM interop, use the NaN member that is a field of the Double structure. The Double structure is part of the .NET Framework.Related Links: Attachments:
Report Date: 02/18/2005 Last Updated: 02/23/2005 Document ID: 3IH91P5B |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
