contour_pipe | R Documentation |
Plot a two dimensional contour plot
contour_pipe(
data_mat,
nlevels = 10,
zlim = range(data_mat, na.rm = TRUE),
low_frac = 0.05,
lwd = 0.25,
main = NA,
col_pos = "black",
col_neg = grDevices::rgb(t(grDevices::col2rgb(col_pos))/255 * 0.25 + 0.75),
add = FALSE,
xlab = NULL,
ylab = NULL,
frame.plot = TRUE
)
data_mat |
matrix with spectral intensities. |
nlevels |
number of contour levels. |
zlim |
minimum and maximum values at which to show contours. |
low_frac |
minimum absolute value (as a fraction of |
lwd |
width of contour lines. |
main |
title of the plot. |
col_pos |
color of positive contours. |
col_neg |
color of negative contours, defaults to lighter version of |
add |
logical indicating whether to add to an existing plot (i.e. not start a new one). |
xlab |
label for x-axis, defaults to |
ylab |
label for y-axis, defaults to |
frame.plot |
a logical indicating whether a box should be drawn around the plot. |
The first dimension of data_matrix
is drawn along the x-axis and the second dimension is drawn along the y-axis.
If low_frac
is specified, then there can actually be up to nlevels
total positive contour levels and/or nlevels
total negative contour levels, whichever has the larger magnitude in zlim
. The other dimension will have the mirror image of those up to the relevant limit in zlim
. Note that the levels do not actually go up to zlim
. There are nlevels+1
log spaced levels calculated from the contour determined by low_frac
up to the maximum absolute zlim
, but the final level is not drawn because it is at the maximum absolute zlim
.
If low_frac
is set to NA
, then the contour levels are calculated in the same way as contour
, with there being approximately nlevels
linearly spaced levels in a range close to zlim
.
Note that this function does not directly take the data returned by read_nmrpipe
. You must pass the int
matrix from the value returned by that function.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.