Skip to main content
Version: Java (Groovy)

catPlot

The catPlot method creates category histograms using data from Deephaven tables.

Syntax

catPlot(seriesName, t, categories, y)
catPlot(seriesName, categories, y)
catPlot(seriesName, sds, categories, y)
catPlot(seriesName, categories, y)

Parameters

ParameterTypeDescription
seriesNameString

The name (as a String) you want to use to identify the series on the plot itself.

tTable

The table that holds the data to be plotted.

categoriesString

The name of the column from t or sds to be used for the categories.

categoriesIndexableData<T>

The indexable data to be used for the categories.

categoriesList<T>

The list of data to be used for the categories.

categoriesdouble[]

The array of data to be used for the categories.

categoriesfloat[]

The array of data to be used for the categories.

categoriesint[]

The array of data to be used for the categories.

categorieslong[]

The array of data to be used for the categories.

categories<T>[]

The array of data to be used for the categories.

sdsSelectableDataSet

Selectable data set (e.g., OneClick filterable table).

yString

Y-values.

yIndexableNumericData<T>

Y-values.

ydouble[]

Y-values.

yfloat[]

Y-values.

yint[]

Y-values.

ylong[]

Y-values.

yshort[]

Y-values.

yDateTime[]

Y-values.

yDate[]

Y-values.

yList<T>

Y-values.

y<T>[]

Y-values.

Returns

A category plot.

Examples

The following example plots data from a Deephaven table.

source = newTable(
stringCol("Categories", "A", "B", "C"),
intCol("Values", 1, 3, 5)
)

result = catPlot("Categories Plot", source, "Categories", "Values")
.chartTitle("Categories And Values")
.show()