3.3.10 Vector XYXY Plot

Version Info

Minimum Origin Version Required: Origin8 SR0

Example

The following function shows how to plot Vector XYXY, before running need to prepare a worksheet with XYXY columns.

void vector_xyxy_plot()
{
	Worksheet wks = Project.ActiveLayer();
	if( !wks )
		return;
	
	DataRange dr;
	dr.Add(wks, 0, "X");
	dr.Add(wks, 1, "Y");
	dr.Add();
	dr.Add(wks, 2, "X2");
	dr.Add(wks, 3, "Y2");
	
	GraphPage gp;
	gp.Create("vectxyxy");
	GraphLayer gl = gp.Layers(0);
	int nn = gl.AddPlot(dr, IDM_PLOT_FLOWVECTOR);
	if( 0 == nn )
	{
		gl.Rescale();
	}	
}