Skip to content

2.5.4 plotHeatmap()

Shun Li edited this page Aug 13, 2024 · 4 revisions

Overview

Given an array (see plotTraces() for details), the function plots a heatmap for the traces.

Inputs and options

Required inputs

  • traces: double, an array that stores all the traces of signal aligned to the event. Each row is each trial and column is each time point.
  • t: double, an vector where each element stores to appropriate time (i.e. x-axis value) for plotting

Options

  • flipYAxis: logical, default is false; If true, the direction of y axis will be flip (the trials number starts from the top and goes down).

Outputs

There is no explicit output for this function. It will plot a heatmap at the current figure.

Example

initializeFig(0.5,1)
[~,~] = plotHeatmap(waterLickIdx,timeRange,signal,bluePurpleRed(1,:),params,...
                        signalFs=finalFs,signalSystem=system);
plotHeatmap(traces,t);
plotEvent('Water',0);
xlabel('Time (s)'); ylabel('Trials');

image

Clone this wiki locally