3.3.13 Wind Rose Plot

Version Info

Minimum Origin Version Required: Origin8 SR0

Wind Rose with Binned Data

To generate binned data from wind rose raw data:

  1. New a worksheet, import Samples\Graphing\WIND.dat from Origin install folder to worksheet.
  2. High-light column B and C, right click and choose Swap Columns to swap B,C columns. Set column C as X type.
  3. High-light column C and B, open Two D Binning dialog from menu Statistics -> Descritive Statistics -> 2D Frequency Count/Binning -> Open Dialog...
  4. Change options as the following and click OK button.
    X -> Minimum Bin Beginning: 0
    X -> Maximum Bin End: 360
    X -> Increment: 30

Run the following function to plot Wind Rose with binned data.

void wind_rose_with_binned_data()
{
	Worksheet wks = Project.ActiveLayer();
	if( wks )
	{
		DataRange dr;
		dr.Add(wks, 0, "X");
		int nLastColIndex = wks.Columns.Count() - 1;
		dr.Add(wks, 1, "Y", nLastColIndex);
		
		GraphPage gp;
		gp.Create("WindRose");
		GraphLayer gl = gp.Layers(0);
		
		int nPlot = gl.AddPlot(dr, IDM_PLOT_COLUMN_STACK); // return the index of newly added plot
		if( 0 == nPlot )
		{
			gl.Rescale();
		}
	}
}

Wind Rose with Raw Data

This plot type not support use GraphLayer::AddPlot to plot in Origin C since this plot generated by X-Function framework.

void wind_rose_with_raw_data()
{
	Worksheet wks = Project.ActiveLayer();
	if( wks )
	{		
		LT_execute("worksheet -px ? WindRoseRaw plot_windrose -d;");		
	}
}