plot module

Collection of tools visualization @Author: Mehrdad Kashefi

plot.RDM(x_dis, w=300, h=300, colormap='inferno', **kwargs)

Plot the RDM matrix

Parameters:
  • x_dis (np.array) – Distance matrix

  • w (int) – Width of the plot

  • h (int) – Height of the plot

  • colormap (str) – Colormap for the plot, default is ‘inferno’

**kwargs:
cond_label (list)

Condition labels

cond_name (str)

Condition name

colorbar (bool)

Show colorbar, default is False

save_path (str)

Path to save the plot, default is None

plot.line_1d(data, **kwargs)

Plot a 1D line (like EMG or speed profile)

Parameters:

data (np.array) – Data to plot (cond, time)

**kwargs:
t_range (list)

Time range for x-axis

title (str)

Title of the plot, set ‘’ for no title

x_label (str)

Label for x-axis

y_label (str)

Label for y-axis

template (str)

Plotly template for figure theme

width (int)

Width of the figure

height (int)

Height of the figure

legend_show (bool)

Whether to show legend

show (bool)

Whether to show the figure

alpha (float)

Line transparency

colors (list/str)

List of colors for each condition, None for monochrome, ‘default’ for colorblind palette, or a list of colors as hex

plot.line_2d(data, **kwargs)

Plot a 2D line (like PCs or XY position)

Parameters:

data (np.array) – Data to plot (cond, time)

**kwargs:
scatters_dict (dict)

Scatter plot parameters

title (str)

Title of the plot, set ‘’ for no title

x_label (str)

Label for x-axis

y_label (str)

Label for y-axis

template (str)

Plotly template for figure theme

width (int)

Width of the figure

height (int)

Height of the figure

force_equal_axis (bool)

Whether to force the axis to be equal, default is False

legend_show (bool)

Whether to show legend

show (bool)

Whether to show the figure

alpha (float)

Line transparency

colors (list/str)

List of colors for each condition, None for monochrome, ‘default’ for colorblind palette, or a list of colors as hex

plot.line_3d(data, **kwargs)

Plot a 2D line (like PCs or XY position)

Parameters:

data (np.array) – Data to plot (cond, time)

**kwargs:
scatters_dict (dict)

Scatter plot parameters

title (str)

Title of the plot, set ‘’ for no title

x_label (str)

Label for x-axis

y_label (str)

Label for y-axis

z_label (str)

Label for z-axis

force_equal_axis (bool)

Whether to force the axis to be equal, default is False

template (str)

Plotly template for figure theme

width (int)

Width of the figure

height (int)

Height of the figure

legend_show (bool)

Whether to show legend

show (bool)

Whether to show the figure

alpha (float)

Line transparency

colors (list/str)

List of colors for each condition, None for monochrome, ‘default’ for colorblind palette, or a list of colors as hex