PURPOSE
This app can be used to create kernel density contour plot for xy Cartesian data, for polar data, or xyz ternary data.
INSTALLATION
Download KernelDensityPlot.opx file, and then drag-and-drop onto the Origin workspace. An icon will appear in the Apps Gallery window.
OPERATION
- Make a worksheet for input data, a polar plot or ternary plot active. Click the Kernel Density Plot icon in the Apps Gallery window.
- In the dialog, select a graph type from Graph Type drop-down list. Three types are available: xy Cartesian, Polar and Ternary. Click OK button.
- If xy Cartesian is chosen in the above step, Origin's built-in 2D Kernel Density dialog will be opened to create kernel density contour or image for xy data.
- If Polar is chosen, a dialog for polar density plot will be opened.
- Choose polar data type first: theta(X) r(Y) or r(X) theta(Y).
- Select polar data in Input Data. Polar data can be xy columns in worksheet or polar plot, and unit for theta data should be Degree.
- Choose a method for kernel density: Bivariate Kernel Density Estimator or Rule of Thumb.
- Number of Grid Points in r/theta can determine number of rows/columns in polar density matrix.
- Grid Range can be used to specify r/theta ranges for polar density data.
- Click OK button. A polar density contour plot will be created.
- If Ternary is chosen, a dialog for ternary density plot will be opened.
- Select ternary data in Input Data. Ternary data can be xyz columns in worksheet or ternary plot.
- Choose ternary scale type in Scale Type: 0-1 or 0-100.
- Choose a method for kernel density: Bivariate Kernel Density Estimator or Rule of Thumb.
- Number of Grid Points in X/Y can specify number of grid points in ternary's x and y directions, and ternary's z is calculated by x and y.
- Click OK button. A ternary density contour plot will be created.
Sample OPJU File
This App provides a sample OPJU file. Right click on the Kernel Density Plot icon in the Apps Gallery window, and choose Show Samples Folder from the short-cut menu. A folder will open. Drag-and-drop the project file KernelDensityPlotEx.opju from the folder onto Origin. The Notes window in the project shows detailed steps.
Note: If you wish to save the OPJU after changing, it is recommended that you save to a different folder location (e.g. User Files Folder).