query_xy_create#

ensight.query_xy_create(title: str, xtitle: str, ytitle: str, data: List[List[float]], segments: list | None = None, filename: str = '', record: int = 0, xvariable: ENS_VAR | None = None, yvariable: ENS_VAR | None = None, case: ENS_CASE | None = None) int#

Create an ENS_QUERY instance

Create a new “file” XY query object.

Args:
title:

The title string for the query.

xtitle:

The title for the X axis

ytitle:

The title for the Y axis

data:

A list of XY list values.

segments:

This is an array of point counts. After every count point, there will be a “break” in the plotted query line.

filename:

The filename to be associated with this query. Note: this is just for reference, the file is not read.

record:

If set to 1, this operation will be recorded into command language.

xvariable:

If set to an ENS_VAR object, that object will define the units for the X axis.

yvariable:

If set to an ENS_VAR object, that object will define the units for the Y axis.

case:

If set to an ENS_CASE object, that object will define the unit system for the query.

Returns:

The index of the created query. The INDEX attribute of the ENS_QUERY object will have this value.

Example:
data = [[1, 1], [2, 4], [3, 9]]
qidx = ensight.query_xy_create("New Data", "X Axis", "Y Axis", data)
query_object = max(ensight.objs.core.QUERIES)