Skip to main content
Version: Python

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

ParameterTypeDescription
series_nameString

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.

categoryString

The name of the column to be used for the categories.

categorylist

The list that contains category values.

yString

The name of the column containing the discrete values.

ylist

The list that contains the discrete values.

y_lowString

The name of the column containing lower y error bar data.

y_highlist

The name of the column containing upper y error bar data.

y_lowString

The list that contains lower y error bar data.

y_highString

The list that contains upper y error bar data.

bylist

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()