LabVIEW:Plotting Data

From OriginLab Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 20:36, 23 October 2008 (edit)
Mking98 (Talk | contribs)

← Previous diff
Current revision (06:11, 22 July 2009) (edit) (undo)
Christyfeng (Talk | contribs)

 
Line 1: Line 1:
-[[Category:LabVIEW Examples]]+[[Category:LabVIEW Examples (LabVIEW VI)]]
This example shows how to create a graph and plot worksheet data to it. This example shows how to create a graph and plot worksheet data to it.

Current revision


This example shows how to create a graph and plot worksheet data to it.

The block below is for creating a new project with a empty graph (OA_NewEmptyGraph), then create a new empty worksheet (OA_NewWorksheet). The Worksheet refnum is then used to call Origin COM property (Worksheet.Cols) to set the 2-column worksheet.

Image:Labview Example4_1.png

A FOR loop is then used to set both two Y columns (OA_Col-Setting.vi), and with Even Sampling (OA_Col-SetEvenSampling.vi) so that we don't need X columns to make plots. Also it fills both columns with some sample data, in the form of Guassian peak.

Image:Labview Example4_2.png

The block below is for plotting(OA_PlotWksCols) the sample data into the graph layer created earlier and to get the GraphPage refnum to use invoke node to call the Activate method, so as to bring the graph to the front.

Image:Labview Example4_3.png