Density Plot (Labs)

A density plot visualization node. The view can be accessed either via the “interactive view” action on the executed node or on KNIME WebPortal.
In the node configuration, you can enable certain controls, which are then available in the view. This includes the ability to choose a dimension column and a condition column or the possibility to set a title. The configuration also offers a preview of the view, which should help to get the density plot fast in the desired shape.

Missing as well as NaN (not a number) values in the dimension column are ignored. If a condition column is chosen, a category is ignored when all corresponding cells in the dimension column are ignored. The density is computed via kernel density estimation with a gaussian kernel. The bandwidth bw for the kernel can either be set to a specific value or computed with Scott's rule of thumb (see also R's bw.nrd). The density is computed on a grid of 500 equidistant points from (min - 3 * bw) to (max + 3 * bw) where min and max are the minimum and maximum values of the data. To speed up the computation, linear binning on the data with 1000 bins is performed as a preprocessing step if n exceeds 1000.

Note, this node is currently under development. Future versions of the node might have improved or changed functionality. Interactivity between multiple views is currently only possible with views also coming from this labs extension.

Options

Dimension column
Select the column with numerical values for which you wish to plot a density. Note: Missing and NaN (not a number) values will be ignored.
Condition column
Select the column with respect to which you want to plot conditional densities. The values of the selected column are treated as categories. Note: Also missing values are treated as a separate category.
Title
The title of the graph shown above the generated image. If left blank, no title will be shown.
Kernel bandwidth
The bandwidth of the gaussian kernel used for the density estimation can be configured here. If “Rule of thumb” is selected, the bandwidth is computed with Scott's rule of thumb: bw = 1.06 * min(std, IQR/1.34) * n^(-1/5), where std is the sample standard deviation, IQR is the interquartile range and n is the number of observations (see also R's bw.nrd).
Adjustment factor
The kernel bandwidth computed by the rule of thumb is multiplied by this adjustment factor.
Custom bandwidth
Choose the bandwidth of the gaussian kernel.
Dimension axis label
The label used for the horizontal dimension axis. If left blank, no label will be shown.
Density axis label
The label used for the vertical value axis. If left blank, no label will be shown.
Line thickness
Numeric value that defines the line size.
Fill area
When checked, the area under the curve is filled.
Dimension axis range
Choose if the dimension axis range should be calculated automatically or should be derived from the domain range. If “Auto axis” is selected the axis ranges from (min - 3 * bw) to (max + 3 * bw) where min and max are the minimum and maximum values of the data and bw is the selected bandwidth. If you select “Domain values”, you might need to use a domain calculator or edit domain node before this node.
Display legend
When checked, the chart’s legend containing the categories of the condition column is displayed.
Enable image download
When checked, an image of the chart can be downloaded by clicking the image download button in the view.
Show tooltip
When checked, hovering over a box will show information about the data.
Enable animation
When checked, the animation of the graph is active.

Input Ports

Icon
Data table containing the dimension and condition column to be plotted in a density plot.

Output Ports

This node has no output ports

Popular Predecessors

  • No recommendations found

Popular Successors

  • No recommendations found

Views

Density Plot (Labs)
A density plot visualization of the input data.

Workflows

  • No workflows found

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.