Minimum Origin Version Required: Origin8 SR0
To generate binned data from wind rose raw data:
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(); } } }
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;"); } }