3.3.9 Vector XYAM Plot

Version Info

Minimum Origin Version Required: Origin8 SR0

Example

To try the following function to plot Vector XYAM, need to prepare a worksheet with XYYY columns.

void vector_plot()
{
	Worksheet wks = Project.ActiveLayer();
	if( wks )
	{
		DataRange dr;
		dr.Add(wks, 0, "X");
		dr.Add(wks, 1, "Y");
		dr.Add(wks, 2, "A"); // Angle
		dr.Add(wks, 3, "M"); // Magnitude
		
		GraphPage gp;
		gp.Create("Vector"); // Vector is template name
		GraphLayer gl = gp.Layers(0);
		
		int nn = gl.AddPlot(dr, IDM_PLOT_VECTOR);
	}
}