Package-level declarations

Mathematical and statistical Swing plots.

Swing based data visualization provides interactive charts and graphs including scatter plots, line plots, bar charts, box plots, histograms, QQ plots, heatmaps, contour plots, 3D surface and wireframe plots, and dendrograms.

Types

Link copied to clipboard
data class CanvasWindow(val frame: JFrame, val canvas: Canvas) : JWindow

Plot canvas window.

Link copied to clipboard
object Html

HTML <img> tag generator for Figure and JComponent.

Link copied to clipboard
interface JWindow

JFrame window wrapper.

Link copied to clipboard
data class MultiFigureWindow(val frame: JFrame, val canvas: MultiFigurePane) : JWindow

Multi-figure plot window.

Functions

Link copied to clipboard
fun barplot(data: DoubleArray): Canvas
fun barplot(data: IntArray): Canvas

Bar plot.

fun barplot(data: Array<DoubleArray>, labels: Array<String>): Canvas

Grouped bar plot.

Link copied to clipboard
fun boxplot(vararg data: DoubleArray): Canvas

Box plot from variable arrays.

fun boxplot(data: Array<DoubleArray>, labels: Array<String>): Canvas

Box plot with labels.

fun boxplot(data: DataFrame, vararg labels: String): Canvas

Box plot from a data frame.

Link copied to clipboard
fun contour(z: Array<DoubleArray>): Canvas

Contour plot.

fun contour(z: Array<DoubleArray>, levels: DoubleArray): Canvas

Contour plot with specified levels.

Contour plot with grid coordinates.

Link copied to clipboard
fun dendrogram(hc: HierarchicalClustering): Canvas

Dendrogram for hierarchical clustering.

fun dendrogram(merge: Array<IntArray>, height: DoubleArray): Canvas

Dendrogram for hierarchical clustering tree and heights.

Link copied to clipboard
fun grid(data: Array<Array<DoubleArray>>): Canvas

2D grid plot.

Link copied to clipboard
fun heatmap(z: Array<DoubleArray>, palette: Array<Color> = Palette.jet(16)): Canvas

Pseudo heatmap plot.

fun heatmap(rowLabels: Array<String>, columnLabels: Array<String>, z: Array<DoubleArray>, palette: Array<Color> = Palette.jet(16)): Canvas

Pseudo heatmap plot with row and column labels.

fun heatmap(x: DoubleArray, y: DoubleArray, z: Array<DoubleArray>, palette: Array<Color> = Palette.jet(16)): Canvas

Pseudo heatmap plot with coordinate axes.

Link copied to clipboard
fun hexmap(z: Array<DoubleArray>, palette: Array<Color> = Palette.jet(16)): Canvas

Heatmap with hex shape.

Link copied to clipboard
fun hist(data: DoubleArray, breaks: DoubleArray, prob: Boolean = false, color: Color = Color.BLUE): Canvas

Histogram plot with custom breaks.

fun hist(data: DoubleArray, k: Int = 10, prob: Boolean = false, color: Color = Color.BLUE): Canvas

Histogram plot.

Link copied to clipboard
fun hist3(data: Array<DoubleArray>, xbins: Int = 10, ybins: Int = 10, prob: Boolean = false, palette: Array<Color> = Palette.jet(16)): Canvas

3D histogram plot.

Link copied to clipboard
fun line(data: Array<DoubleArray>, style: Line.Style = Line.Style.SOLID, color: Color = Color.BLACK, mark: Char = ' ', label: String? = null): Canvas

Line plot.

Link copied to clipboard
fun plot(x: Array<DoubleArray>, y: Array<String>, mark: Char = '*'): Canvas

Scatter plot with string group labels.

fun plot(x: Array<DoubleArray>, mark: Char = '*', color: Color = Color.BLACK): Canvas

Scatter plot.

fun plot(x: Array<DoubleArray>, y: IntArray, mark: Char = '*'): Canvas

Scatter plot with integer class labels.

fun plot(data: DataFrame, x: String, y: String, mark: Char = '*', color: Color = Color.BLACK): Canvas

Scatter plot from a data frame.

fun plot(data: DataFrame, x: String, y: String, category: String, mark: Char = '*'): Canvas

Scatter plot from a data frame with color by category.

fun plot(data: DataFrame, x: String, y: String, z: String, mark: Char = '*', color: Color = Color.BLACK): Canvas

3D Scatter plot from a data frame.

fun plot(data: DataFrame, x: String, y: String, z: String, category: String, mark: Char = '*'): Canvas

3D Scatter plot from a data frame with color by category.

Link copied to clipboard
fun qqplot(x: DoubleArray): Canvas

QQ plot of samples to standard normal distribution.

fun qqplot(x: DoubleArray, y: DoubleArray): Canvas

QQ plot of two continuous sample sets.

fun qqplot(x: DoubleArray, d: Distribution): Canvas

QQ plot of samples to given distribution.

fun qqplot(x: IntArray, y: IntArray): Canvas

QQ plot of two discrete sample sets.

fun qqplot(x: IntArray, d: DiscreteDistribution): Canvas

QQ plot of samples to given discrete distribution.

Link copied to clipboard
fun screeplot(varianceProportion: DoubleArray): Canvas

Scree plot for principal component analysis.

Link copied to clipboard
fun show(scene: Scene): JFrame

Shows a scene in a new window.

Link copied to clipboard
fun splom(data: DataFrame, mark: Char = '*', color: Color = Color.BLACK): MultiFigurePane

Scatterplot Matrix (SPLOM).

fun splom(data: DataFrame, mark: Char, category: String): MultiFigurePane
fun splom(data: DataFrame, category: String, mark: Char = '*'): MultiFigurePane

Scatterplot Matrix (SPLOM) with color by category.

Link copied to clipboard
fun spy(matrix: SparseMatrix, k: Int = 1): Canvas

Visualize sparsity pattern.

Link copied to clipboard
fun staircase(data: Array<DoubleArray>, color: Color = Color.BLACK, label: String? = null): Canvas

Staircase line plot.

Link copied to clipboard
fun surface(z: Array<DoubleArray>, palette: Array<Color> = Palette.jet(16)): Canvas

3D surface plot.

fun surface(x: DoubleArray, y: DoubleArray, z: Array<DoubleArray>, palette: Array<Color> = Palette.jet(16)): Canvas

3D surface plot with coordinate grid.

Link copied to clipboard
fun text(texts: Array<String>, coordinates: Array<DoubleArray>): Canvas

Text plot.

Link copied to clipboard
fun wireframe(vertices: Array<DoubleArray>, edges: Array<IntArray>): Canvas

Wireframe plot.