View source: R/afni_spectrum.R
| plot_colorspectrum | R Documentation | 
plot a color spectrum read in by afni.spectrum
plot_colorspectrum(colorval, lab = "val", side = 2, ax = T, thres = NA)
| 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 | 
 # 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.