deephaven.plot

The plot package includes all the modules for creating plots.

class AxisFormat(j_axis_format)[source]

Bases: JObjectWrapper

The AxisFormat class defines the format for axis tick labels. For time values, this would be how the dates are formatted. For numerical values, this would be the number of significant digits, etc.

j_object_type

alias of AxisFormat

set_pattern(pattern)[source]

Set the pattern used for formatting values.

For details on the supported patterns see the javadoc for DateTimeFormatter.

Parameters:

pattern (str) – pattern string indicating how values should be formatted.

Return type:

None

class AxisTransform(j_axis_transform)[source]

Bases: JObjectWrapper

An axis transformation that is applied before rendering a plot. Axis transforms include logarithms, business time, etc.

j_object_type

alias of AxisTransform

class Color(j_color)[source]

Bases: JObjectWrapper

A color.

j_object_type

alias of Color

static of_hsl(h, s, l, alpha=1.0)[source]

Creates a Color with the specified hue, saturation, lightness, and alpha. The lower the alpha, the more transparent the color.

Parameters:
  • h (float) – the hue component, as a degree on the color wheel in the range (0.0 - 360.0)

  • s (float) – the saturation component, as a percentage in the range (1.0 - 100.0)

  • l (float) – the lightness component, as a percentage in the range (1.0 - 100.0)

  • alpha (float) – the alpha component in the range (0.0 - 1.0), default is 1.0. Lower alpha means more transparent for the color.

Return type:

Color

Returns:

a Color

Raises:

DHError

static of_name(name)[source]

Creates a Color instance represented by the name string.

Colors are specified by name or hex value. Hex values are parsed as follows: first two digits set the Red component of the color; second two digits set the Green component; third two the Blue. Hex values must have a “#” in front, e.g. “#001122”

Parameters:

name (str) – the name of the color

Return type:

Color

Returns:

a Color

Raises:

DHError

static of_rgb(r, g, b, alpha=255)[source]

Creates a Color with the specified red, green, blue, and alpha values.

Parameters:
  • r (int) – the red component in the range (0 - 255)

  • g (int) – the green component in the range (0 - 255)

  • b (int) – the blue component in the range (0 - 255)

  • alpha (int) – the alpha component in the range (0 - 255), default is 255. Lower alpha means more transparent for the color.

Return type:

Color

Returns:

a Color

Raises:

DHError

static of_rgb_f(r, g, b, alpha=1.0)[source]

Creates a Color with the specified red, green, blue, and alpha values expressed in floating numbers.

Parameters:
  • r (float) – the red component in the range (0.0 - 1.0)

  • g (float) – the green component in the range (0.0 - 1.0)

  • b (float) – the blue component in the range (0.0 - 1.0)

  • alpha (float) – the alpha component in the range (0.0 - 1.0), default is 1.0. Lower alpha means more transparent for the color.

Return type:

Color

Returns:

a color

Raises:

DHError

class Colors[source]

Bases: object

The Colors class provides a namespace for all the predefined colors.

class DecimalAxisFormat[source]

Bases: AxisFormat

A formatter for converting decimals into formatted strings.

For details on the supported patterns see the javadoc for DecimalFormat.

j_object_type

alias of AxisFormat

set_pattern(pattern)

Set the pattern used for formatting values.

For details on the supported patterns see the javadoc for DateTimeFormatter.

Parameters:

pattern (str) – pattern string indicating how values should be formatted.

Return type:

None

class Figure(rows=1, cols=1, j_figure=None)[source]

Bases: JObjectWrapper

A Figure represents a graphical figure such as a plot, chart, line, axis, color, etc. A Figure is immutable, and all function calls return a new immutable Figure instance.

Initializes a Figure object that is used for displaying plots

Parameters:
  • rows (int, optional) – Number of rows in the figure. Defaults to 1.

  • cols (int, optional) – Number of columns in the figure. Defaults to 1.

  • j_figure (jpy.JType, internal) – Internal use only.

axes(name=None, axes=None, remove_series=None, plot_style=None)[source]

Gets specific axes from the chart and updates the chart’s axes’s configurations.

Parameters:
  • name (str) – name

  • axes (int) – identifier

  • remove_series (List[str]) – names of series to remove

  • plot_style (Union[str, PlotStyle]) – plot style

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

axis(dim=None, t=None, label=None, color=None, font=None, format=None, format_pattern=None, min=None, max=None, invert=None, log=None, business_time=None, calendar=None, transform=None)[source]

Gets a specific axis from a chart’s axes and updates the axis’s configurations.

Parameters:
  • dim (int) – dimension of the axis

  • t (Union[Table, SelectableDataSet]) – table or selectable data set (e.g. OneClick filterable table)

  • label (str) – label

  • color (Union[str, int, Color]) – color

  • font (Font) – font

  • format (AxisFormat) – label format

  • format_pattern (str) – label format pattern

  • min (Union[str, float]) – minimum value to display

  • max (Union[str, float]) – maximum value to display

  • invert (bool) – invert the axis.

  • log (bool) – log axis

  • business_time (bool) – business time axis using the default calendar

  • calendar (Union[str, BusinessCalendar]) – business time axis using the specified calendar

  • transform (AxisTransform) – axis transform.

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

chart(multi_series_key=None, remove_series=None, index=None, row=None, col=None, row_span=None, col_span=None, orientation=None, grid_visible=None, x_grid_visible=None, y_grid_visible=None, pie_label_format=None)[source]

Gets a chart from the figure’s grid and updates a chart’s configuration.

Parameters:
  • multi_series_key (List[Any]) – multi-series keys or a column name containing keys.

  • remove_series (List[str]) – names of series to remove

  • index (int) – index from the Figure’s grid. The index starts at 0 in the upper left hand corner of the grid and increases going left to right, top to bottom. E.g. for a 2x2 Figure, the indices would be [0, 1] [2, 3].

  • row (int) – row index in the Figure’s grid. The row index starts at 0.

  • col (int) – column index in this Figure’s grid. The column index starts at 0.

  • row_span (int) – how many rows high.

  • col_span (int) – how many rows wide.

  • orientation (str) – plot orientation.

  • grid_visible (bool) – x-grid and y-grid are visible.

  • x_grid_visible (bool) – x-grid is visible.

  • y_grid_visible (bool) – y-grid is visible.

  • pie_label_format (str) – pie chart format of the percentage point label.

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

chart_legend(color=None, font=None, visible=None)[source]

Updates a chart’s legend’s configuration.

Parameters:
  • color (Union[str, int, Color]) – color

  • font (Font) – font

  • visible (int) – true to draw the design element; false otherwise.

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

chart_title(t=None, title=None, columns=None, format=None, max_rows=None, column_names_in_title=None, color=None, font=None)[source]

Sets the title of the chart.

Parameters:
  • t (Union[Table, SelectableDataSet]) – table or selectable data set (e.g. OneClick filterable table)

  • title (str) – title

  • columns (List[str]) – columns to include in the title

  • format (str) – a java.text.MessageFormat format string for formatting column values in the title

  • max_rows (int) – maximum number of row values to show in title

  • column_names_in_title (bool) – whether to show column names in title. If this is true, the title format will include the column name before the comma separated values; otherwise only the comma separated values will be included.

  • color (Union[str, int, Color]) – color

  • font (Font) – font

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

figure(remove_series=None, remove_chart_index=None, remove_chart_row=None, remove_chart_col=None, update_millis=None)[source]

Updates the figure’s configuration.

Parameters:
  • remove_series (List[str]) – names of series to remove

  • remove_chart_index (int) – index from the Figure’s grid to remove. The index starts at 0 in the upper left hand corner of the grid and increases going left to right, top to bottom. E.g. for a 2x2 Figure, the indices would be [0, 1][2, 3].

  • remove_chart_row (int) – row index in this Figure’s grid. The row index starts at 0.

  • remove_chart_col (int) – column index in this Figure’s grid. The row index starts at 0.

  • update_millis (int) – update interval in milliseconds.

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

figure_title(title=None, color=None, font=None)[source]

Sets the title of the figure.

Parameters:
  • title (str) – title

  • color (Union[str, int, Color]) – color

  • font (Font) – font

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

func(xmin=None, xmax=None, npoints=None)[source]

Updates the configuration for plotting a function.

Parameters:
  • xmin (float) – minimum x value to display

  • xmax (float) – maximum x value to display

  • npoints (int) – number of points

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

j_object_type

alias of Figure

line(multi_series_key=None, color=None, style=None, visible=None)[source]

Sets the line color, style, visibility.

Parameters:
  • multi_series_key (List[Any]) – multi-series keys or a column name containing keys.

  • color (Union[str, int, Color]) – color

  • style (Union[str, LineStyle]) – line style

  • visible (int) – true to draw the design element; false otherwise.

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

new_axes(name=None, dim=None)[source]

Creates new axes.

Parameters:
  • name (str) – name

  • dim (int) – dimension of the axis

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

new_chart(index=None, row=None, col=None)[source]

Adds a new chart to this figure.

Parameters:
  • index (int) – index from the Figure’s grid. The index starts at 0 in the upper left hand corner of the grid and increases going left to right, top to bottom. E.g. for a 2x2 Figure, the indices would be [0, 1] [2, 3].

  • row (int) – row index in the Figure’s grid. The row index starts at 0.

  • col (int) – column index in this Figure’s grid. The column index starts at 0.

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

plot_cat(series_name, t=None, category=None, y=None, y_low=None, y_high=None, by=None)[source]

Creates a plot with a discrete, categorical axis. Categorical data must not have duplicates.

Parameters:
  • series_name (str) – name of the data series

  • t (Union[Table, SelectableDataSet]) – table or selectable data set (e.g. OneClick filterable table)

  • category (Union[str, List[str], List[int], List[float]]) – discrete data or column name

  • y (Union[str, List[int], List[float], List[Instant]]) – y-values or column name

  • y_low (Union[str, List[int], List[float], List[Instant]]) – lower y error bar

  • y_high (Union[str, List[int], List[float], List[Instant]]) – upper y error bar

  • by (List[str]) – columns that hold grouping data

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

plot_cat_hist(series_name, t=None, category=None)[source]

Creates a histogram with a discrete axis. Charts the frequency of each unique element in the input data.

Parameters:
  • series_name (str) – name of the data series

  • t (Union[Table, SelectableDataSet]) – table or selectable data set (e.g. OneClick filterable table)

  • category (Union[str, List[str], List[int], List[float]]) – discrete data or column name

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

plot_ohlc(series_name, t=None, x=None, open=None, high=None, low=None, close=None, by=None)[source]

Creates an open-high-low-close plot.

Parameters:
  • series_name (str) – name of the data series

  • t (Union[Table, SelectableDataSet]) – table or selectable data set (e.g. OneClick filterable table)

  • x (Union[str, List[Instant]]) – x-values or column name

  • open (Union[str, List[int], List[float], List[Instant]]) – bar open y-values.

  • high (Union[str, List[int], List[float], List[Instant]]) – bar high y-values.

  • low (Union[str, List[int], List[float], List[Instant]]) – bar low y-values.

  • close (Union[str, List[int], List[float], List[Instant]]) – bar close y-values.

  • by (List[str]) – columns that hold grouping data

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

plot_pie(series_name, t=None, category=None, y=None)[source]

Creates a pie plot. Categorical data must not have duplicates.

Parameters:
  • series_name (str) – name of the data series

  • t (Union[Table, SelectableDataSet]) – table or selectable data set (e.g. OneClick filterable table)

  • category (Union[str, List[str], List[int], List[float]]) – discrete data or column name

  • y (Union[str, List[int], List[float], List[Instant]]) – y-values or column name

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

plot_treemap(series_name, t, id, parent, value=None, label=None, hover_text=None, color=None)[source]

Creates a treemap. Must have only one root.

Parameters:
  • series_name (str) – name of the data series

  • t (Union[Table, SelectableDataSet]) – table or selectable data set (e.g. OneClick filterable table)

  • id (str) – column name containing IDs

  • parent (str) – column name containing parent IDs

  • value (str) – column name containing values

  • label (str) – column name containing labels

  • hover_text (str) – column name containing hover text

  • color (str) – column name containing color

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

plot_xy(series_name, t=None, x=None, x_low=None, x_high=None, y=None, y_low=None, y_high=None, function=None, by=None, x_time_axis=None, y_time_axis=None)[source]

Creates an XY plot.

Parameters:
  • series_name (str) – name of the data series

  • t (Union[Table, SelectableDataSet]) – table or selectable data set (e.g. OneClick filterable table)

  • x (Union[str, List[int], List[float], List[Instant]]) – x-values or column name

  • x_low (Union[str, List[int], List[float], List[Instant]]) – lower x error bar

  • x_high (Union[str, List[int], List[float], List[Instant]]) – upper x error bar

  • y (Union[str, List[int], List[float], List[Instant]]) – y-values or column name

  • y_low (Union[str, List[int], List[float], List[Instant]]) – lower y error bar

  • y_high (Union[str, List[int], List[float], List[Instant]]) – upper y error bar

  • function (Callable) – function

  • by (List[str]) – columns that hold grouping data

  • x_time_axis (bool) – whether to treat the x-values as times

  • y_time_axis (bool) – whether to treat the y-values as times

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

plot_xy_hist(series_name, t=None, x=None, xmin=None, xmax=None, nbins=None)[source]

Creates an XY histogram.

Parameters:
  • series_name (str) – name of the data series

  • t (Union[Table, SelectableDataSet]) – table or selectable data set (e.g. OneClick filterable table)

  • x (Union[str, List[int], List[float], List[Instant]]) – x-values or column name

  • xmin (float) – minimum x value to display

  • xmax (float) – maximum x value to display

  • nbins (int) – number of bins

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

point(t=None, category=None, multi_series_key=None, color=None, label=None, shape=None, size=None, label_format=None, visible=None)[source]

Sets the point color, label, size, visibility, etc.

Parameters:
  • t (Union[Table, SelectableDataSet]) – table or selectable data set (e.g. OneClick filterable table)

  • category (Union[str, List[str], List[int], List[float]]) – discrete data or column name

  • multi_series_key (List[Any]) – multi-series keys or a column name containing keys.

  • color (Union[str, int, Color, List[str], List[int], List[Color], Callable, Dict[Any,str], Dict[Any,int], Dict[Any,Color]]) – colors or a column name containing colors

  • label (Union[str, List[str], Callable, Dict[Any,str]]) – labels or a column name containing labels

  • shape (Union[str, Shape, List[str], List[Shape], Callable, Dict[Any,str], Dict[Any,Shape]]) – shapes or a column name containing shapes

  • size (Union[int, float, List[int], List[float], Callable, Dict[Any,int], Dict[Any,float]]) – sizes or a column name containing sizes

  • label_format (str) – point label format.

  • visible (int) – true to draw the design element; false otherwise.

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

save(path, height=None, width=None, wait=None, timeout_seconds=None)[source]

Saves the Figure as an image.

Parameters:
  • path (str) – output path.

  • height (int) – figure height.

  • width (int) – figure width.

  • wait (bool) – whether to hold the calling thread until the file is written.

  • timeout_seconds (int) – timeout in seconds to wait for the file to be written.

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

series(name=None, axes=None, group=None, multi_series_key=None, color=None, tool_tip_pattern=None, x_tool_tip_pattern=None, y_tool_tip_pattern=None, error_bar_color=None, gradient_visible=None, naming_function=None)[source]

Gets a specific data series and updates the data series’s configurations.

Parameters:
  • name (str) – name

  • axes (int) – identifier

  • group (int) – group for the data series.

  • multi_series_key (List[Any]) – multi-series keys or a column name containing keys.

  • color (Union[str, int, Color]) – color

  • tool_tip_pattern (str) – x and y tool tip format pattern

  • x_tool_tip_pattern (str) – x tool tip format pattern

  • y_tool_tip_pattern (str) – y tool tip format pattern

  • error_bar_color (Union[str, int, Color]) – error bar color.

  • gradient_visible (bool) – bar gradient visibility.

  • naming_function (Callable) – series naming function

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

show()[source]

Creates a displayable version of the figure and returns it.

Args:

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

ticks(font=None, gap=None, loc=None, angle=None, visible=None)[source]

Updates the configuration for major ticks of an axis.

Parameters:
  • font (Font) – font

  • gap (float) – distance between ticks.

  • loc (List[float]) – coordinates of the tick locations.

  • angle (int) – angle in degrees.

  • visible (int) – true to draw the design element; false otherwise.

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

ticks_minor(nminor=None, visible=None)[source]

Updates the configuration for minor ticks of an axis.

Parameters:
  • nminor (int) – number of minor ticks between consecutive major ticks.

  • visible (int) – true to draw the design element; false otherwise.

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

twin(name=None, dim=None)[source]

Creates a new Axes which shares one Axis with the current Axes. For example, this is used for creating plots with a common x-axis but two different y-axes.

Parameters:
  • name (str) – name

  • dim (int) – dimension of the axis

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

x_axis(t=None, label=None, color=None, font=None, format=None, format_pattern=None, min=None, max=None, invert=None, log=None, business_time=None, calendar=None, transform=None)[source]

Gets the x-Axis from a chart’s axes and updates the x-Axis’s configurations.

Parameters:
  • t (Union[Table, SelectableDataSet]) – table or selectable data set (e.g. OneClick filterable table)

  • label (str) – label

  • color (Union[str, int, Color]) – color

  • font (Font) – font

  • format (AxisFormat) – label format

  • format_pattern (str) – label format pattern

  • min (Union[str, float]) – minimum value to display

  • max (Union[str, float]) – maximum value to display

  • invert (bool) – invert the axis.

  • log (bool) – log axis

  • business_time (bool) – business time axis using the default calendar

  • calendar (Union[str, BusinessCalendar]) – business time axis using the specified calendar

  • transform (AxisTransform) – axis transform.

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

x_ticks(font=None, gap=None, loc=None, angle=None, visible=None)[source]

Updates the configuration for major ticks of the x-Axis.

Parameters:
  • font (Font) – font

  • gap (float) – distance between ticks.

  • loc (List[float]) – coordinates of the tick locations.

  • angle (int) – angle in degrees.

  • visible (int) – true to draw the design element; false otherwise.

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

x_ticks_minor(nminor=None, visible=None)[source]

Updates the configuration for minor ticks of the x-Axis.

Parameters:
  • nminor (int) – number of minor ticks between consecutive major ticks.

  • visible (int) – true to draw the design element; false otherwise.

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

x_twin(name=None)[source]

Creates a new Axes which shares the x-Axis with the current Axes. For example, this is used for creating plots with a common x-axis but two different y-axes.

Parameters:

name (str) – name

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

y_axis(t=None, label=None, color=None, font=None, format=None, format_pattern=None, min=None, max=None, invert=None, log=None, business_time=None, calendar=None, transform=None)[source]

Gets the y-Axis from a chart’s axes and updates the y-Axis’s configurations.

Parameters:
  • t (Union[Table, SelectableDataSet]) – table or selectable data set (e.g. OneClick filterable table)

  • label (str) – label

  • color (Union[str, int, Color]) – color

  • font (Font) – font

  • format (AxisFormat) – label format

  • format_pattern (str) – label format pattern

  • min (Union[str, float]) – minimum value to display

  • max (Union[str, float]) – maximum value to display

  • invert (bool) – invert the axis.

  • log (bool) – log axis

  • business_time (bool) – business time axis using the default calendar

  • calendar (Union[str, BusinessCalendar]) – business time axis using the specified calendar

  • transform (AxisTransform) – axis transform.

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

y_ticks(font=None, gap=None, loc=None, angle=None, visible=None)[source]

Updates the configuration for major ticks of the y-Axis.

Parameters:
  • font (Font) – font

  • gap (float) – distance between ticks.

  • loc (List[float]) – coordinates of the tick locations.

  • angle (int) – angle in degrees.

  • visible (int) – true to draw the design element; false otherwise.

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

y_ticks_minor(nminor=None, visible=None)[source]

Updates the configuration for minor ticks of the y-Axis.

Parameters:
  • nminor (int) – number of minor ticks between consecutive major ticks.

  • visible (int) – true to draw the design element; false otherwise.

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

y_twin(name=None)[source]

Creates a new Axes which shares the y-Axis with the current Axes. For example, this is used for creating plots with a common y-axis but two different x-axes.

Parameters:

name (str) – name

Return type:

Figure

Returns:

a new Figure

Raises:

DHError

class Font(family='Arial', style=FontStyle.PLAIN, size=8)[source]

Bases: JObjectWrapper

A specific font, defined in terms of family, style, and size.

Creates a Font object.

Parameters:
  • family (str) – the font family, defaults to ‘Arial’

  • style (FontStyle) – the font style, defaults to FontStyle.PLAIN

  • size (int) – the point size of the Font, defaults to 8

j_object_type

alias of Font

class FontStyle(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

An enum of predefined font styles.

BOLD = io.deephaven.plot.Font$FontStyle(objectRef=0x1e233652)

Bold text

BOLD_ITALIC = io.deephaven.plot.Font$FontStyle(objectRef=0x1e233662)

Bold and italic text

ITALIC = io.deephaven.plot.Font$FontStyle(objectRef=0x1e23365a)

Italic text

PLAIN = io.deephaven.plot.Font$FontStyle(objectRef=0x1e23364a)

Plain text.

class LineEndStyle(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

An enum defining styles for shapes drawn at the end of a line.

BUTT = io.deephaven.plot.LineStyle$LineEndStyle(objectRef=0x1e23367a)

Square line ending with edge against the end data points.

ROUND = io.deephaven.plot.LineStyle$LineEndStyle(objectRef=0x1e235742)

Round end shape.

SQUARE = io.deephaven.plot.LineStyle$LineEndStyle(objectRef=0x1e23574a)

Square line ending. Similar to BUTT, but overshoots the end data points.

class LineJoinStyle(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

An enum defining styles for drawing the connections between line segments.

BEVEL = io.deephaven.plot.LineStyle$LineJoinStyle(objectRef=0x1e235762)

Line joins are flat.

MITER = io.deephaven.plot.LineStyle$LineJoinStyle(objectRef=0x1e23576a)

Line joins are pointed.

ROUND = io.deephaven.plot.LineStyle$LineJoinStyle(objectRef=0x1e235772)

Line joins are rounded.

class LineStyle(width=1.0, end_style=LineEndStyle.ROUND, join_style=LineJoinStyle.ROUND, dash_pattern=None)[source]

Bases: JObjectWrapper

A LineStyle object represents the style of a line which includes line thickness, dash patterns, end styles, segment join styles, and dash patterns.

Line thickness is 1 by default. Larger numbers draw thicker lines.

Dash pattern is defined by a list of numbers. If only one value is included in the array, the dash and the gap after the dash will be the same. If more than one value is used in the array, the first value represents the length of the first dash in the line. The next value represents the length of the gap between it and the next dash. Additional values can be added into the array for subsequent dash/gap combinations. For example, the array [20,5] creates a dash pattern with a 20 length dash and a 5 length gap. This pattern is repeated till the end of the line.

Creates a LineStyle object.

Parameters:
  • width (float) – the width of the line, default is 1.0

  • end_style (LineEndStyle) – the end style of the line, default is LineEndStyle.ROUND

  • join_style (LineJoinStyle) – the join style of the line, default is LineJoinStyle.ROUND

  • dash_pattern (Optional[list[Number]]) – a list of number specifying the dash pattern of the line

Raises:

DHError

j_object_type

alias of LineStyle

class NanosAxisFormat(tz=None)[source]

Bases: AxisFormat

A formatter for converting nanoseconds into formatted strings.

Creates a new NanosAxisFormat with the specified timezone.

Parameters:

tz (Optional[TimeZone]) – the timezone to use for formatting, default is None meaning to use the default time zone.

j_object_type

alias of AxisFormat

set_pattern(pattern)

Set the pattern used for formatting values.

For details on the supported patterns see the javadoc for DateTimeFormatter.

Parameters:

pattern (str) – pattern string indicating how values should be formatted.

Return type:

None

class PlotStyle(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

An enum defining the styles of a plot (e.g. line, bar, etc.).

AREA = io.deephaven.plot.PlotStyle(objectRef=0x1e2357b2)

An area chart (does not display shapes at data points by default).

BAR = io.deephaven.plot.PlotStyle(objectRef=0x1e23579a)

A bar chart.

ERROR_BAR = io.deephaven.plot.PlotStyle(objectRef=0x1e2357ea)

An error bar plot (points are not displayed by default).

HISTOGRAM = io.deephaven.plot.PlotStyle(objectRef=0x1e2357ca)

A histogram chart.

LINE = io.deephaven.plot.PlotStyle(objectRef=0x1e2357aa)

A line chart (does not display shapes at data points by default).

OHLC = io.deephaven.plot.PlotStyle(objectRef=0x1e2357d2)

An open-high-low-close chart.

PIE = io.deephaven.plot.PlotStyle(objectRef=0x1e2357c2)

A pie chart.

SCATTER = io.deephaven.plot.PlotStyle(objectRef=0x1e2357da)

A scatter plot (lines are not displayed by default).

STACKED_AREA = io.deephaven.plot.PlotStyle(objectRef=0x1e2357ba)

A stacked area chart (does not display shapes at data points by default).

STACKED_BAR = io.deephaven.plot.PlotStyle(objectRef=0x1e2357a2)

A stacked bar chart.

STEP = io.deephaven.plot.PlotStyle(objectRef=0x1e2357e2)

A step plot.

class SelectableDataSet(j_sds)[source]

Bases: JObjectWrapper

A SelectableDataSet provides a view of a selectable subset of a table. For example, in some selectable data sets, a GUI click can be used to select a portion of a table.

j_object_type

alias of SelectableDataSet

class Shape(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

CIRCLE = io.deephaven.gui.shape.JShapes(objectRef=0x1e2358c2)

Circle.

DIAMOND = io.deephaven.gui.shape.JShapes(objectRef=0x1e2358d2)

Diamond.

DOWN_TRIANGLE = io.deephaven.gui.shape.JShapes(objectRef=0x1e2358f2)

Down triangle.

ELLIPSE = io.deephaven.gui.shape.JShapes(objectRef=0x1e2358e2)

Ellipse.

HORIZONTAL_RECTANGLE = io.deephaven.gui.shape.JShapes(objectRef=0x1e2358da)

Horizontal rectangle.

LEFT_TRIANGLE = io.deephaven.gui.shape.JShapes(objectRef=0x1e235902)

Left triangle.

RIGHT_TRIANGLE = io.deephaven.gui.shape.JShapes(objectRef=0x1e2358ea)

Right triangle.

SQUARE = io.deephaven.gui.shape.JShapes(objectRef=0x1e2358ba)

Square.

UP_TRIANGLE = io.deephaven.gui.shape.JShapes(objectRef=0x1e2358ca)

Up triangle.

VERTICAL_RECTANGLE = io.deephaven.gui.shape.JShapes(objectRef=0x1e2358fa)

Vertical rectangle.

axis_transform(name)[source]

Returns a predefined AxisTransform object by its name.

Parameters:

name (str) – the predefined AxisTransform name

Return type:

AxisTransform

Returns:

a AxisTransform

Raises:

DHError

axis_transform_names()[source]

Returns the names of available axis transforms.

Return type:

list[str]

font_family_names()[source]

A list of supported font family names.

Return type:

list[str]