plot_colorspectrum: plot a color spectrum read in by afni.spectrum

View source: R/afni_spectrum.R

plot_colorspectrumR Documentation

plot a color spectrum read in by afni.spectrum

Description

plot a color spectrum read in by afni.spectrum

Usage

plot_colorspectrum(colorval, lab = "val", side = 2, ax = T, thres = NA)

Arguments

colorval

the list output of afni.spectrum

lab

label for the relevant axis, defaults to useless 'val'

side

which direction to draw the graph 1 horz, 2 vertical. matches par's meaning of side

ax

T/F weither or not this function should draw an axis. Default T;label for max,middle, and min

Examples

 # Simple
 colorval <- afni.spectrum(5)
 plot_colorspectrum(colorval,'F') 

 # Threshold, provide on axis
 # limit to a threshold
 plot_colorspectrum(colorval,'F',thres=2.68) 
 # only  positive
 cv <- afni.spectrum(c(0,5))
 plot_colorspectrum(cv,'F') 
 # start at threshold
 cv <- cv[cv$invals>2.68,]
 plot_colorspectrum(cv,'F') 
 # make text 150% of the normal size for the labels
 par(cex.lab=1.5)
 # plot
 plot_colorspectrum(cv,'F',ax=F) 
 # add our own axis
 axis(side=2,at=c(3,4,5),labels=c("3","","5"),las=2)

LabNeuroCogDevel/LNCDR documentation built on Oct. 13, 2023, 4:31 a.m.