plot_cat_hist
The plot_cat_hist
method creates category histograms using data from Deephaven tables or arrays.
Syntax
plot_cat_hist(series_name, t, category)
plot_cat_hist(series_name, category)
Parameters
Parameter | Type | Description |
---|---|---|
series_name | 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. |
category | String | The name of the column containing the discrete values. |
category | list | The list containing the discrete values. |
Returns
A category histogram plot.
Examples
The following example plots data from a Deephaven table.
from deephaven.plot.figure import Figure
from deephaven.column import int_col
from deephaven import new_table
source = new_table([
int_col("Keys", [3, 2, 2, 1, 1, 1])
])
figure = Figure()
new_fig = figure.plot_cat_hist(series_name="Keys count", t=source, category="Keys")
new_fig = new_fig.chart_title(title="Count of Each Key")
new_plot = new_fig.show()
- new_plot
- source