visbrain.objects.TimeSeries3DObj

class visbrain.objects.TimeSeries3DObj(name, data, xyz, select=None, line_width=1.5, color='white', ts_amp=6.0, ts_width=20.0, alpha=1.0, antialias=False, translate=(0.0, 0.0, 1.0), transform=None, parent=None, verbose=None, _z=-10.0, **kw)[source][source]

Create a 3-D time-series object.

Parameters:
namestring

Name of the time-series object.

dataarray_like

Array of time-series of shape (n_sources, n_time_points)

xyzarray_like

The 3-D center location of each time-series of shape (n_sources, 3).

selectarray_like | None

Select the time-series to display. Should be a vector of bolean values of shape (n_sources,).

line_widthfloat | 1.5

Time-series’ line width.

colorarray_like/tuple/string | ‘white’

Time-series’ color.

ts_ampfloat | 6.

Graphical amplitude of the time-series.

ts_widthfloat | 20.

Graphical width of the time-series.

alphafloat | 1.

Time-series transparency.

antialiasbool | False

Use smooth lines.

translatetuple | (0., 0., 1.)

Translate the time-series over the (x, y, z) axes.

transformVisPy.visuals.transforms | None

VisPy transformation to set to the parent node.

parentVisPy.parent | None

Line object parent.

verbosestring

Verbosity level.

_zfloat | 10.

In case of (n_sources, 2) use _z to specify the elevation.

kwdict | {}

Optional arguments are used to control the colorbar (See ColorbarObj).

Notes

List of supported shortcuts :

  • s : save the figure

  • <delete> : reset camera

Examples

>>> import numpy as np
>>> from visbrain.objects import TimeSeries3DObj
>>> n_pts, n_ts = 100, 5
>>> time = np.arange(n_pts)
>>> phy = np.random.uniform(2, 30, (n_ts))
>>> data = np.sin(2 * np.pi * time.reshape(1, -1) * phy.reshape(-1, 1))
>>> xyz = np.random.uniform(-20, 20, (n_ts, 3))
>>> ts = TimeSeries3DObj('Ts', data, xyz, antialias=True, color='red',
>>>                    line_width=3.)
>>> ts.preview(axis=True)

Methods

__init__(name, data, xyz[, select, ...])

Init.

animate([step, interval, iterations])

Animate the object.

copy()

Get a copy of the object.

describe_tree()

Tree description.

preview([bgcolor, axis, xyz, show, obj, ...])

Previsualize the result.

record_animation(name[, n_pic, bgcolor])

Record an animated object and save as a *.gif file.

render()

Render the canvas.

screenshot(saveas[, print_size, dpi, unit, ...])

Take a screeshot of the scene.

set_shortcuts_to_canvas(canvas)

Set shortcuts to a VisbrainCanvas.

to_dict()

Return a dictionary of all colorbar args.

to_kwargs([addisminmax])

Return a dictionary for input arguments.

update()

Update line.

update_from_dict(kwargs)

Update attributes from a dictionary.

Examples using visbrain.objects.TimeSeries3DObj

Combine multiple objects

Combine multiple objects

Time-series and pictures 3D (TimeSeries3DObj & Picture3DObj): complete tutorial

Time-series and pictures 3D (TimeSeries3DObj & Picture3DObj): complete tutorial

Add time series

Add time series