Contains the basic viewing framework for KNIME. Its main elements are so-called plotters. A plotter consists of four elements:
There exists a hierarchy of plotters each adds some functionality. They may be extended at every point in the hierarchy.
The most abstract plotter is the {@link org.knime.base.node.viz.plotter.AbstractPlotter} which provides functionality of selection, zooming, moving and correctly resizing the component. Although it is an abstract plotter X and Y axis may be set.
The next plotter in the hierarchy is the {@link org.knime.base.node.viz.plotter.basic.BasicPlotter} which provides functionality to plot basic drawing elements such as lines (polygons), ellipses and rectangles. The plotter comes along with these basic elements but also let you define your own {@link org.knime.base.node.viz.plotter.basic.BasicDrawingElement} and add it to the drawing pane.
The next sub branch of the basic plotter is the {@link org.knime.base.node.viz.plotter.columns.TwoColumnPlotter}
which plots two selectable columns.
The following diagram roughly sketches the hierachy described so far with their
implementing components.
All plotters deeper down the hierarchy are special implementations, which can also be extended, though. These are the {@link org.knime.base.node.viz.plotter.box.BoxPlotter}, realizing a so-called box-and-whisker plot, {@link org.knime.base.node.viz.plotter.dendrogram.DendrogramPlotter}, which converts a hierachical cluster result into a dendrogram, the {@link org.knime.base.node.viz.plotter.line.LinePlotter}, which draws the values of each column as a line, the {@link org.knime.base.node.viz.plotter.parcoord.ParallelCoordinatesPlotter}, which draws the columns as parallel axes and connects the values of one row by a line, the {@link org.knime.base.node.viz.plotter.scatter.ScatterPlotter}, painting the data values of two selected columns as dots in 2-dimensional space, and the {@link org.knime.base.node.viz.plotter.scattermatrix.ScatterMatrixPlotter}, which displays a matrix of 2-dimensional scatter plots for every column combination.
This subframework also provides a Node to easily add a plotter to the KNIME framework.
The {@link org.knime.base.node.viz.plotter.node.DefaultVisualizationNodeView} is constructed with
a NodeModel
and a plotter. If only the incoming data is needed for the visualization,
the {@link org.knime.base.node.viz.plotter.node.DefaultVisualizationNodeModel} can be used.
It takes the incoming data, puts it in a {@link org.knime.base.node.util.DataArray} and realizes the
loading and saving of the data. It also implements the {@link org.knime.base.node.viz.plotter.DataProvider}
interface on which the plotter relies to get the data to visualize. In cases where not
a {@link org.knime.base.node.util.DataArray} is used to represent the data, the
DefaultVisualizationNode has to be extended or replaced by a more sophisticated implementation.
If the {@link org.knime.base.node.viz.plotter.node.DefaultVisualizationNodeModel} is used, only a
{@link org.knime.core.node.NodeFactory} has to be defined, where the code might look like the following
example:
/** * @see org.knime.core.node.NodeFactory#createNodeDialogPane() */ protected NodeDialogPane createNodeDialogPane() { return new DefaultVisualizationNodeDialog(); } /** * @see org.knime.core.node.NodeFactory#createNodeModel() */ public NodeModel createNodeModel() { return new DefaultVisualizationNodeModel(); } /** * @see org.knime.core.node.NodeFactory#createNodeView(int, * org.knime.core.node.NodeModel) */ public NodeView createNodeView(final int viewIndex, final NodeModel nodeModel) { return new DefaultVisualizationNodeView(nodeModel, new LinePlotter()); }For more information see also the detailed description.