2.10.12 plot_marginal

Brief Information

Plot different kinds of Marginal Plots.

Command Line Usage

1. plot_marginal -r 1 type:=kde_fill method:=thumb density:=binned top:=box right:=violin;

2. plot_marginal -r 1 type:=scatter_with_lr top:=dist_fill right:=violin gap:=5 size:=40 rugs:=1;

X-Function Execution Options

Please refer to the page for additional option switches when accessing the x-function from script

Variables

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

Input

XYRange

<active>

Specify the input data.

Main Layer type

Input

int

0

Specify the plot type for the main layer of the graph.

Option List:

  • 0=scatter: Scatter
    Select this plot type to plot all selected XY dataset as scatter plot(s) into the middle main layer.
  • 1=scatter_with_lr: Scatter with Linear Regression
    Select this plot type to plot all selected dataset as scatter plots with individual linear regression curves into the middle main layer.
    With this plot typed selected, another two controls Confidence Band and Confidence Level will appear to let you control the linear regression for all plotted scatter plots. Confidence Band is used to add two-side confidence band for the linear regression curves, and Confidence Level is used to set the confidence level for the confidence band.
  • 2=kde_fill: Kernel Density Contour Fill
    Select this plot type to plot all selected dataset as contour-filled kernel density plots.
    With this plot typed selected, another three controls Bandwidth Method, Density Method and Number of Points to Display will appear to let you control the appearance of the Kernel Density plots.
  • 3=kde_line: Kernel Density Contour Line
    Select this plot type to plot all selected dataset as kernel density plots just showing contour lines.
    With this plot typed selected, another three controls Bandwidth Method, Density Method and Number of Points to Display will appear to let you control the appearance of the Kernel Density plots.
Confidence Band conf

Input

int

1

When Main Layer is Scatter with Linear Regression (type=scatter_with_lr) , the option is available. You can specify whether to add two-side confidence band for the linear regression curves.

Option List:

  • 0=false
  • 1=true
Confidence Level level

Input

double

95

When Main Layer is Scatter with Linear Regression (type=scatter_with_lr) , the option is available. You can specify the confidence level for the confidence band.

Bandwidth Method method

Input int

0

When Main Layer is Kernel Density Contour Fill or Kernel Density Contour Line (type=kde_fill or type=kde_line), the option is available. Specify the bandwidth calculation method of the 2D Kernel Density plot.

Option List:

  • 0=bivariate: Bivariate Kernel Density Estimator
  • 1=thumb: Rule of Thumb
Density Method density

Input

int

0

When Main Layer is Kernel Density Contour Fill or Kernel Density Contour Line (type=kde_fill or type=kde_line), the option is available. Specify a method to calculate the kernel density for defined XY grids.

Option List:

  • 0=exact:Exact Estimation
    Choose the option to calculate density values according to the Ks2density equation. For a large dataset, computation of the exact computation may require extensive calculation.
  • 1=binned:Binned Approximate Estimation
    Choose the option to calculate approximation of density values. This option is recommended for a large sample.
Number of Grid Points in X/Y grid

Input

int

32

Specify the number of equally spaced grid points for the density estimation.

Top Layer top

Input

int

Histograms

Specify the plot type for the top layer of the graph.

Option List:

  • 0=hist: Histograms
    Plot all X dataset in the top layer as a histogram. If there are multiple X dataset, plot them as histograms overlapped.
  • 1=stacked_hist: Stacked Histograms
    Plot all X dataset in the top layer as a stacked histogram.
  • 2=box: Box Charts
    Plot all X dataset in the top layer as box charts.
  • 3=violin: Violins
    Plot all X dataset in the top layer as violin box charts.
  • 4=dist: Distribution Curves
    Plot all X dataset in the top layer as distribution curves.
  • 5=dist_fill: Distribution Curves with Fill
    Plot all X dataset in the top layer as distribution curves with the area been filled.
  • 6=histo_curve: Histograms with Curves
    Plot all X dataset in the top layer as histogram with distribution curve. If there are multiple X dataset, plot them as side-by-side histograms.
Right Layer right

Input

int

-1

Specify the plot type for the right layer of the graph.

Option List:

  • 0=hist: Histograms
    Plot all X dataset in the top layer as a histogram. If there are multiple X dataset, plot them as histograms overlapped.
  • 1=stacked_hist: Stacked Histograms
    Plot all X dataset in the top layer as a stacked histogram.
  • 2=box: Box Charts
    Plot all X dataset in the top layer as box charts.
  • 3=violin: Violins
    Plot all X dataset in the top layer as violin box charts.
  • 4=dist: Distribution Curves
    Plot all X dataset in the top layer as distribution curves.
  • 5=dist_fill: Distribution Curves with Fill
    Plot all X dataset in the top layer as distribution curves with the area been filled.
  • 6=histo_curve: Histograms with Curves
    Plot all X dataset in the top layer as histogram with distribution curve. If there are multiple X dataset, plot them as side-by-side histograms.
Gap between Layers gap

Input

double

0

Adjust the gap between the top/right layer and main layer.
For the top layer, the gap with main layer is the percentage of the height of main layer;
For the right layer, the gap with main layer if the percentage of the width of main layer.

Size of Marginal Layer (%) size

Input

double

33.3

Adjust the size of the top and right layer. For the top and right layer, as the layer width is linked with the width and height of main layer, you are only allowed to adjust the height of the layer in the percentage of the height and width of the main layer.

Show Rugs rugs

Input

int

0

Specify whether show the axis rugs for the main layer. The rugs will be added between the main and top/right layer.

Option List:

  • 0=false
  • 1=true
Density Estimation Data om

Output

MatrixPage

<new>

Density Estimation Data


Description

This X-Function supports to plot different kinds of Marginal Plots.

Please refer to Marginal Plots for more details.