Plotting#
- sails.plotting.root_plot(rts, ax=None, figargs={}, plotargs={})[source]#
Plot a set of roots (complex numbers).
- Parameters:
rts (ndarray_like) – Roots to plot
ax (matplotlib axes handle) – Optional Axes on which to place plot. (Default value = None)
figargs (dict) – extra arguments to pass to plt.figure (Default value = dict())
plotargs (dict) – extra arguments to pass to plt.plot (Default value = dict())
- Returns:
Axes object on which plot was drawn
- Return type:
Axes
- sails.plotting.plot_vector(metric, x_vect, y_vect=None, x_label=None, y_label=None, title=None, labels=None, line_labels=None, F=None, cmap=<matplotlib.colors.LinearSegmentedColormap object>, triangle=None, diag=False, thresh=None, two_tail_thresh=False, font_size=10, use_latex=False)[source]#
Function for plotting frequency domain connectivity at a single time-point.
- Parameters:
metric (ndarray) – matrix containing connectivity values [nsignals x signals x frequencies x participants] in which the first dimension refers to source nodes and the second dimension refers to target nodes
x_vect (ndarray) – vector of frequencies to label the x axis
y_vect (ndarrat) – vector containing the values for the y-axis
x_label (string [optional]) – label for the x axis (Default value = None)
y_label (string [optional]) – label for the y axis (Default value = None)
title (string [optional]) – title for the figure (Default value = None)
labels (list) – list of node labels for columns and vectors (Default value = None)
line_labels (list) – list of labels for each separate line (participant dimension in metric) (Default value = None)
F (figurehandle [optional]) – handle of existing figure to plot within (Default value = None)
triangle (string [optional]) – string to indicate whether only the ‘upper’ or ‘lower’ triangle of the matrix should be plotted (Default value = None)
diag (bool [optional]) – flag to indicate whether the diagonal elements should be plotted (Default value = False)
thresh (ndarray [optional]) – matrix containing thresholds to be plotted alongside connectivity values [nsignals x nsignals x frequencies] (Default value = None)
two_tailed_thresh (bool [optional]) – flag to indicate whether both signs (+/-) of the threshold should be plotted
font_size (int [optional]) – override the default font size
use_latex (bool) – Flag to indicate whether to render text in latex (Default value = False)
- Returns:
Figure handle containing the plot
- Return type:
matplotlib figure handle
- sails.plotting.plot_matrix(metric, x_vect, y_vect, x_label=None, y_label=None, z_vect=None, title=None, labels=None, F=None, vlines=None, cmap=<matplotlib.colors.LinearSegmentedColormap object>, font_size=8, use_latex=False, diag=True)[source]#
Function for plotting frequency domain connectivity over many time points
- Parameters:
metric (ndarray) – matrix containing connectivity values [nsignals x signals x frequencies x participants] in which the first dimension refers to source nodes and the second dimension refers to target nodes
x_vect (1d array) – vector of frequencies to label the x axis
y_vect (1d array [optional]) – vector containing the values for the y-axis
z_vect (1d array [optional]) – vector containing values for the colour scale (Default value = None)
x_label (string [optional]) – label for the x axis (Default value = None)
y_label (string [optional]) – label for the y axis (Default value = None)
title (string [optional]) – title for the figure (Default value = None)
labels (list) – list of node labels for columns and vectors (Default value = None)
F (figurehandle [optional]) – handle of existing figure to plot within (Default value = None)
vlines (list) – List of x-axis values to plot a dashed vertical line (Default value = None)
cmap (matplotlib colormap [optional]) – matplotlib.cm.<colormapname> to use for colourscale (redundant for plot vector??) (Default value = plt.cm.jet)
font_size (int [optional]) – override the default font size
use_latex (bool) – Flag indicating whether to render text in latex (Default value = False)
diag (bool) – Flag indicating whether to plot the diagonal subplots (Default value = True)
- Returns:
Figure handle containing the plot
- Return type:
matplotlib figure handle
- class sails.circular_plots.CircosHandler[source]#
Handler for producing plots using the Circos tool.
Note that if you are creating plots for publication using Circos, you should cite the relevant publication: [Krzywinski2009].