Default plot functions for ENCORE

encore.plotters.encore_plots.enscomp_plot_similarity(plot_widget, matrix, labels, color)
encore.plotters.encore_plots.enscomp_update_map(plot_widget, lims, members_idx, members_freqs, members_coords, members_colors, neuron_size)
encore.plotters.encore_plots.enscomp_update_timelines(plot_widget, ticks, cell_activities, ensemble_dffo, ensemble_timecourse, colors, limx)
encore.plotters.encore_plots.plot_all_binary(plot_widget, bin_matrix, cells_names, ens_idx, plot_idx)
encore.plotters.encore_plots.plot_all_coords(plot_widget, coordinates, highlight_idxs, exclusives, row, col)
encore.plotters.encore_plots.plot_all_dFFo(plot_widget, dFFo_ens, core_names, plot_ax)
encore.plotters.encore_plots.plot_assembly_patterns(plot_widget, Patterns, row_idx, title=None, plot_xaxis=False)
encore.plotters.encore_plots.plot_cell_assemblies_activity(plot_widget, activities)
encore.plotters.encore_plots.plot_coordinates2D_highlight(plot_widget, coordinates, highlight_idxs, exclusives, only_ens, only_contours, show_numbers)
encore.plotters.encore_plots.plot_core_cells(plot_widget, core_cells, clims)
encore.plotters.encore_plots.plot_delta_rho(plot_widget, rho, delta, cents, predbounds, ens_cols)
encore.plotters.encore_plots.plot_eigs(plot_widget, eigs, seleig)
encore.plotters.encore_plots.plot_ens_corr(plot_widget, ens_corr, corr_thr, ens_cols)
encore.plotters.encore_plots.plot_ens_seq(plot_widget, tt, ens_labs, ens_cols, sellabs)
encore.plotters.encore_plots.plot_ensemble_dFFo(plot_widget, dFFo_ens, cell_names, ens_activity)
encore.plotters.encore_plots.plot_ensembles_timecourse(plot_widget, timecourse, xlabel='Timepoint')
encore.plotters.encore_plots.plot_for_example_simple_line(plot_widget, line)

Plot a single time series line on a MatplotlibWidget.

This helper function clears the current axes of the provided MatplotlibWidget, plots a one-dimensional signal, and formats the figure with axis labels suitable for neuronal activity visualization (e.g., dFFo traces).

It is intended to be used by algorithm-specific plotting functions to ensure consistent styling and figure handling across the GUI.

Parameters:
  • plot_widget (MatplotlibWidget) – Matplotlib widget where the line will be plotted.

  • line (array-like) – One-dimensional array representing a time series signal.

encore.plotters.encore_plots.plot_pca(plot_widget, pcs, ens_labs=None, ens_cols=None)
encore.plotters.encore_plots.plot_perf_correlations_cells(plot_widget, correlations, cells_names, col_idx, row_idx, title=None)
encore.plotters.encore_plots.plot_perf_correlations_ens_group(plot_widget, correlations, col_idx, title=None, xlabel='Group', group_labels=[])
encore.plotters.encore_plots.plot_perf_cross_ens_stims(plot_widget, cross_corrs, lags, col_idx, row_idx, group_prefix='Group', title=None, group_labels=[])
encore.plotters.encore_plots.plot_singular_values(plot_widget, singulars, num_states)

Runs a imshow plot in the plot_widget and applies the attributes specified in the arguments

Parameters:
  • plot_widget (MatplotlibWidget) – Widget where the plot will be produced.

  • singulars (numpy.ndarray) – 1D numpy array with the singular values from the SVD.

  • num_states (int) – Cutoff for the number of states, a red dot is placed at this point.

encore.plotters.encore_plots.plot_states_from_svd(plot_widget, svd_sig, comp_n, row, col)
encore.plotters.encore_plots.preview_coordinates2D(plot_widget, dataset)

Creates a 2D plot in the plot_widget.

Parameters:
  • plot_widget (MatplotlibWidget) – Widget where the plot will be produced.

  • dataset (numpy.ndarray) – Numpy matrix with the data to plot.

encore.plotters.encore_plots.preview_dataset(plot_widget, dataset, xlabel='Timepoint', ylabel='Data', title=None, cmap='hot', aspect='auto', yitems_labels=[])

Runs a imshow plot in the plot_widget and applies the attributes specified in the arguments

Parameters:
  • plot_widget (MatplotlibWidget) – Widget where the plot will be produced.

  • dataset (numpy.ndarray) – Numpy matrix with the data to plot.

  • xlabel (str, optional) – X label for the plot, defaults to ‘Timepoint’

  • ylabel (str, optional) – Y label for the plot, defaults to ‘Data’

  • title (str, optional) – Title for the plot, defaults to None

  • cmap (str, optional) – Color map for the plot, compatible with Matplotlib, defaults to ‘hot’

  • aspect (str, optional) – Aspect ratio of the map, defaults to ‘auto’

  • yitems_labels (list, optional) – Custom y labels for the map, defaults to []

encore.plotters.encore_plots.raster_plot(plot_widget, data_neuronal_activity)

Plots the time course for the passed neuronal activity. Creates a vertical line for each value in the matrix equal to 1. The rest are considered as no activity.

Parameters:
  • plot_widget (MatplotlibWidget) – Widget where the plot will be produced.

  • dataset (numpy.ndarray) – Numpy matrix with the data to plot.