Plot: Contour: 2D Kernel Density
Create a 2D Kernel Density plot
Minimum Origin Version Required: 2015 SR0
1. plot_kde2 -r 1 iy:=[Book1BA]Sheet1!(A"House For Sale",B"Regular Conventional Retail Gasoline Prices");
2. plot_kde2 iy:=[Book1BA]Sheet1!(A,B) points:=28;
3. plot_kde2 method:=thumb points:=286 plot:=image;
Please refer to the page for additional option switches when accessing the x-function from script
Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
---|---|---|---|---|
Input | iy |
Input Range |
|
The input data range. |
Bandwidth Method | method |
Input Int |
|
Specify the bandwidth method of the 2D Kernel Density plot.
Option List:
|
Density Method | density |
Input int |
|
Specify the density method.
Option List:
|
Number of Grid Points in X/Y | grid |
Input int |
|
Specify the number of equally spaced grid points for the density estimation. |
Number of Points to Display | points |
Input int |
|
Specify the first N lowest density points to be superimposed on the density image. |
Interpolate Density Points | interp |
Input int |
|
Specify whether to interpolate density points: 0=false, 1=true |
X Minimum | xmin |
Input double |
|
Specify the X minimum value of the gridded matrix from which the kernel density plot is created. |
X Maximum | xmax |
Input double |
|
Specify the X maximum value of the gridded matrix from which the kernel density plot is created. |
Y Minimum | ymin |
Input double |
|
Specify the Y minimum value of the gridded matrix from which the kernel density plot is created. |
Y Maximum | xmax |
Input double |
|
Specify the Y maximum value of the gridded matrix from which the kernel density plot is created. |
Plot Type | plot |
Input Int |
|
Specify the plot type.
Option List:
|
Density Estimation Data | om |
Output Matrix Object |
|
Specify where the calculated data for the graph is stored. |
Display Data | rd |
Output ReportData |
|
Specify where the data of the displayed scatter plot is stored. Only available when points is not 0. |
For detailed information about this X-Function, please refer to our User Guide 2D Kernel Density Plot
Note: in Origin 2017 or ealier versions, this X-Function is not accessible from LabTalk script. To create 2D Kernel Density plot from script, you will need to use
worksheet -px
For example,
worksheet -px ? kdCONTOUR plot_kde2 iy:=[Book1]Sheet1!(A,B) xmin:=35 xmax:=680;