grapa.curve_image.Curve_Image

class grapa.curve_image.Curve_Image(*args, **kwargs)

Bases: Curve

The purpose class Curve_Image is to provid GUI support to create images (imshow), as well as contour and contourf plots.

__init__(*args, **kwargs)

Methods

__init__(*args, **kwargs)

aggregate_into_matrix(graph[, alter])

see aggregate_samex_into_matrix_i starts at current curve index

aggregate_into_matrix_i(graph, start_i[, alter])

aggregates content of several curves into a data matrix.

convert_matrix_xyz(*_args[, graph])

Converts a 2D data meshgrid Z[x, y] into 3 columns X, Y, Z

convert_xyz_matrix(*_args[, graph])

Converts matrix data stored as 3-column xyz into a 2D data meshgrid.

funcListGUI(**kwargs)

Fills in the Curve actions specific to the Curve type. Retuns a list, which elements are instances of FuncGUI, or (old style): ::.

get_image_data(graph, graph_i, alter[, ...])

graph: the Graph the Curve is in graph_i: index of Curve in graph alter: 2-elements list for alter

process_matrix(data, x, y[, xy1rowcol, ...])

Perform header label extraction, transposition and rotation on data matrix

update_extent(*args)

Update the attribute extent.

update_levels(typ, start, stop, step)

Modifies the 'levels' used to colorize a plot.

x_y_z_to_xyz(vectorx, vectory, matrixz)

From vectorx, vectory and Z (meshgrid format), Returns a 3-column XYZ array

xyz_to_x_y_z(data)

Interpret a 3-column XYZ array into X, Y (both 1D vectors of x, y values) and Z (meshgrid format)

Attributes

CURVE

aggregate_into_matrix(graph: Graph, alter: list = None)

see aggregate_samex_into_matrix_i starts at current curve index

static aggregate_into_matrix_i(graph: Graph, start_i: int, alter: list = None)

aggregates content of several curves into a data matrix. starts at given curve index

convert_matrix_xyz(*_args, graph=None)

Converts a 2D data meshgrid Z[x, y] into 3 columns X, Y, Z

convert_xyz_matrix(*_args, graph=None)

Converts matrix data stored as 3-column xyz into a 2D data meshgrid.

funcListGUI(**kwargs)

Fills in the Curve actions specific to the Curve type. Retuns a list, which elements are instances of FuncGUI, or (old style):

[func,
 'Button text',
 ['label 1', 'label 2', ...],
 ['value 1', 'value 2', ...],
 {'hiddenvar1': 'value1', ...}, (optional)
 [dictFieldAttributes, {}, ...]] (optional)

By default, returns quick modifs for offset and muloffset (if already set), and a help for some plot types (errorbar, scatter).

Parameters:

kwargs – this function should be called specifying kwargs[‘graph’] the graph self is embedded in, and kwargs[‘graph_i’] as position of self in graph.

get_image_data(graph, graph_i, alter, ignore_next=0)

graph: the Graph the Curve is in graph_i: index of Curve in graph alter: 2-elements list for alter

static process_matrix(data, x, y, xy1rowcol=False, transpose=False, rotate=False)

Perform header label extraction, transposition and rotation on data matrix

update_extent(*args)

Update the attribute extent. Must define all values, none left empt ‘’.

update_levels(typ: str, start, stop, step)

Modifies the ‘levels’ used to colorize a plot.

Parameters:
  • typ – possible values ‘arange’, ‘linspace’, ‘logspace’, ‘geomspace’

  • start – start of e.g. arange

  • stop – stop of e.g. arange

  • step – step of e.g. arange

static x_y_z_to_xyz(vectorx, vectory, matrixz)

From vectorx, vectory and Z (meshgrid format), Returns a 3-column XYZ array

static xyz_to_x_y_z(data)

Interpret a 3-column XYZ array into X, Y (both 1D vectors of x, y values) and Z (meshgrid format)