2.10.6 X-Function:plot_kde2


Menu Information

Plot: Contour: 2D Kernel Density

Brief Information

Create a 2D Kernel Density plot

Additional Information

Minimum Origin Version Required: 2015 SR0

Command Line Usage

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;

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Input iy

Input

Range

<active>
The input data range.
Bandwidth Method method

Input

Int

0
Specify the bandwidth method of the 2D Kernel Density plot.

Option List:

  • 0:Bivariate Kernel Density Estimator
  • 1:Rules of Thumb
Density Method density

Input

int

0
Specify the density method.

Option List:

  • 0:Exact Estimation
  • 1:Binned Approximate Estimation
Number of Grid Points in X/Y grid

Input

int

32
Specify the number of equally spaced grid points for the density estimation.
Number of Points to Display points

Input

int

0
Specify the first N lowest density points to be superimposed on the density image.
Interpolate Density Points interp

Input

int

0
Specify whether to interpolate density points: 0=false, 1=true
X Minimum xmin

Input

double

<auto>
Specify the X minimum value of the gridded matrix from which the kernel density plot is created.
X Maximum xmax

Input

double

<auto>
Specify the X maximum value of the gridded matrix from which the kernel density plot is created.
Y Minimum ymin

Input

double

<auto>
Specify the Y minimum value of the gridded matrix from which the kernel density plot is created.
Y Maximum xmax

Input

double

<auto>
Specify the Y maximum value of the gridded matrix from which the kernel density plot is created.
Plot Type plot

Input

Int

0
Specify the plot type.

Option List:

  • 0:Contour
Use the density matrix to plot contour
  • 1:Image
Use the density matrix to make an image plot
Density Estimation Data om

Output

Matrix Object

<new>
Specify where the calculated data for the graph is stored.
Display Data rd

Output

ReportData

[<input>]<new>
Specify where the data of the displayed scatter plot is stored. Only available when points is not 0.

Description

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;