plot_cat
The plot_cat
method creates category histograms using data from Deephaven tables.
Syntax
plot_cat(series_name, t, category, y)
plot_cat(series_name, t, category, y, y_low, y_high)
plot_cat(series_name, t, category, y, by)
plot_cat(series_name, category, y)
plot_cat(series_name, category, y, y_low, y_high)
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 to be used for the categories. |
category | list | The list that contains category values. |
y | String | The name of the column containing the discrete values. |
y | list | The list that contains the discrete values. |
y_low | String | The name of the column containing lower y error bar data. |
y_high | list | The name of the column containing upper y error bar data. |
y_low | String | The list that contains lower y error bar data. |
y_high | String | The list that contains upper y error bar data. |
by | list | A list of one or more columns that contain grouping data. |
Returns
A category plot.
Examples
The following example plots data from a Deephaven table.
from deephaven.plot.figure import Figure
from deephaven import new_table
from deephaven.column import int_col, string_col
source = new_table([
string_col("Categories", ["A", "B", "C"]),
int_col("Values", [1, 3, 5])
])
figure = Figure()
new_fig = figure.plot_cat(series_name="Cagetories Plot", t=source, category="Categories", y="Values")
new_fig = new_fig.chart_title(title="Categories and Values")
new_plot = new_fig.show()
- new_plot
- source