plotEha: Create color time-frequency plots from eha results.

plotEhaR Documentation

Create color time-frequency plots from eha results.

Description

Create color time-frequency plots from eha results.

Usage

plotEha(spec,xmin,xmax,ymin,ymax,h=6,w=4,ydir=1,pl=0,norm,palette=6,
        centerZero=T,ncolors=100,colorscale=F,xlab,ylab,filetype=0,output=T,verbose=T)

Arguments

spec

Time-frequency spectral results to evaluate. Must have the following format: column 1=frequency; remaining columns (2 to n)=power, amplitude or probability; titles for columns 2 to n must be the location (depth or height). Note that this format is ouput by function eha.

xmin

Minimum frequency for PLOTTING.

xmax

Maximum frequency for PLOTTING.

ymin

Minimum depth/height for PLOTTING.

ymax

Maximum depth/height for PLOTTING.

h

Height of plot in inches.

w

Width of plot in inches.

ydir

Direction for y-axis in plots (depth or height). -1 = values increase downwards (slower plotting!), 1 = values increase upwards.

pl

An option for the color plots (0=linear scale; 1=plot log of value [useful for plotting power], 2=normalize to maximum value in each window [useful for plotting amplitude], 3=use normalization provided in norm.

norm

Optional amplitude normalization divisor, consisting of a single column dataframe. This option is provided in case you'd like to normalize a set of EHA results using the same scheme (e.g., before and after removal of spectral lines).

palette

What color palette would you like to use? (1) rainbow, (2) grayscale, (3) blue, (4) red, (5) blue-white-red (if values are negative and positive, white is centered on zero), (6) viridis

centerZero

Center color scale on zero (use an equal number of postive and negative color divisions)? (T or F)

ncolors

Number of colors steps to use in palette.

colorscale

Include a color scale in the plot? (T or F)

xlab

Label for x-axis. Default = "Frequency"

ylab

Label for y-axis. Default = "Location"

filetype

Generate .pdf, .jpeg, .png or tiff file? (0=no; 1=pdf; 2=jpeg; 3=png; 4=tiff)

output

If amplitude is normalized (pl = 2), output normalization used? (T or F)

verbose

Verbose output? (T or F)

Examples

## as an example, evaluate the modelA
data(modelA)

## interpolate to even sampling interval of 0.075 m
ex1=linterp(modelA, dt=0.075)
  
## perform EHA with a time-bandwidth parameter of 2, using an 7.95 meter window, 0.15 m step, 
## and pad to 1000 points, output amplitude
res=eha(ex1,tbw=2,win=7.95,step=0.15,pad=1000,genplot=0,output=3)

# plot EHA amplitude, normalized to maximum value in each window
plotEha(res,xlab="Frequency (cycles/m)",ylab="Height (m)",pl=2)

astrochron documentation built on Sept. 30, 2024, 9:14 a.m.