histPlot
The histPlot
method creates histograms using data from Deephaven tables or arrays.
Syntax
histPlot(seriesName, x, xmin, xmax, nbins)
histPlot(seriesName, x, nbins)
histPlot(seriesName, x, xmin, xmax, nbins)
histPlot(seriesName, t)
histPlot(seriesName, t, x, xmin, xmax, nbins)
histPlot(seriesName, t, x, nbins)
histPlot(seriesName, sds, x, xmin, xmax, nbins)
histPlot(seriesName, sds, x, nbins)
Parameters
Parameter | Type | Description |
---|---|---|
seriesName | String | The name (as a String) you want to use to identify the series on the plot itself. |
t | Table | The table that holds the data to be plotted. |
sds | SelectableDataSet | A selectable data set - e.g., OneClick filterable table. |
nbins | int | The number of intervals to use in the chart. |
x | double[] | The data to be used for the X values. |
x | float[] | The data to be used for the X values. |
x | int[] | The data to be used for the X values. |
x | long[] | The data to be used for the X values. |
x | short[] | The data to be used for the X values. |
x | String | The name of a column in |
x | List<T> | The data to be used for the X values. |
x | <T>[] | The data to be used for the X values. |
xmin | double | The minimum X value in the range. |
xmax | double | The maximum X value in the range. |
Returns
A histogram.
Examples
The following example plots data from a Deephaven table.
source = newTable(
intCol("Values", 1, 2, 2, 3, 3, 3, 4, 4, 5)
)
result = histPlot("Histogram Values", source, "Values", 5)
.chartTitle("Histogram Of Values")
.show()
- source
- result
The following example plots data from an array.
source = [1, 2, 2, 3, 3, 3, 4, 4, 5] as int[]
result = histPlot("Histogram Values", source, 5)
.chartTitle("Histogram Of Values")
.show()
- result