plotResults: Plot both the spatial and temporal components from Step 3 of...

Description Usage Arguments Details Value See Also Examples

View source: R/SCALPEL_graphics.R

Description

We plot the temporal components, displaying the estimated fluorescence over time for each spatial component, along with a map of the spatial components.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
plotResults(
  scalpelOutput,
  neuronsToDisplay = NULL,
  colVec = NULL,
  titleA = "",
  titleZ = "",
  ylabZ = "",
  fileName = NULL,
  pctTransp = 0.7,
  number = TRUE,
  border = FALSE
)

Arguments

scalpelOutput

An object returned by one of the SCALPEL functions: scalpel or scalpelStep3.

neuronsToDisplay

Vector giving which neurons' spatial and temporal components to plot. The indices refer to which columns of scalpelOutput$Afilter to plot. By default, all components are plotted. Users may also specify "kept", which will exclude all dictionary elements discarded using a previous call to reviewNeurons or reviewNeuronsInteractive.

colVec

Vector of colors to use, which are chosen automatically if the default value of NULL is used.

titleA

Label for the title of the spatial components plot.

titleZ

Label for the title of the temporal components plot.

ylabZ

Label for the y-axis of the temporal components plot.

fileName

If provided, the plot will be saved to the specified location.

pctTransp

The percent transparency (in [0,1]) for the colors used to plot the neurons. The default value is 0.7.

number

Logical value indicating whether the neurons should be numbered.

border

Logical value indicating whether only the borders of the neurons should be plotted.

Details

If lambdaIndex is NULL, each temporal component is scaled by its largest value. If lambdaIndex is specified, each temporal component is scaled by its largest value across all of the lambda values. Temporal components that were zeroed out in the sparse group lasso are omitted from the plot, and their corresponding spatial components are shown in gray.

Value

None

See Also

scalpelStep3, scalpel, plotSpatial, plotTemporal

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
### many of the functions in this package are interconnected so the
### easiest way to learn to use the package is by working through the vignette,
### which is available at ajpete.com/software

#assumes you have run the example for the "scalpel" function

#simplest example with default parameters:
plotResults(scalpelOutput = scalpelOutput)

#example with optional parameters:
#plot only two of the neurons, do not number neurons, draw the outlines of the neurons
plotResults(scalpelOutput = scalpelOutput, neuronsToDisplay = c(1,2),
           number = FALSE, border = TRUE)

## End(Not run)

scalpel documentation built on Feb. 3, 2021, 9:05 a.m.