plotCalciOMatic {CalciOMatic}R Documentation

Low-Level Plot Function for CalciOMatic

Description

The low-level function plotCalciOMatic performs different kinds of predefined plots, depending on the value of n. It is generally called by plot methods dedicated to several types of objects ("fluo_rawdata", "ratio_fit", "ratio_fit_list" or "direct_fit")

Usage

plotCalciOMatic(x = NULL, y = NULL, n = 1, x2 = NULL, y2 = NULL,
                col = "black", col2 = "darkgray",
                main = "MyCalciumRatiometricFit",
                xlab = "", ylab = "", lab = "A", ylas = 1,
                oma = c(4, 0, 1, 0), mar = c(0, 7, 2, 0),
                ask = FALSE, ...)

Arguments

x the abscissa of the main signal to plot (see details below)
y the main signal to plot (see details below)
n an integer, between 1 and 5, telling which kind of plot is used (see details below)
x2 the abscissa of the secondary signal to plot (see details below)
y2 the secondary signal to plot (see details below)
col the color of the main signal (either an integer or a character string)
col2 the color of the secondary signal (either an integer or a character string)
main a character string specifying the main title of the plot
xlab a character string specifying the label of the x-axis
ylab a character string specifying the label of the y-axis
lab a character string specifying the label at the top-left of the plot (generally a letter, a letter with an integer, or an expression)
ylas an integer specifying the orientation of the yticks. Possible values are 0 or 3 (vertical), or 1 or 2 (horizontal)
oma a vector of length 4 specifying the outer margin of the figure
mar a vector of length 4 specifying the margin of the panel to add
ask a logical value. Set to FALSE to draw all plots on the same figure. If set to TRUE, a single device will be opened, in which the first plot will be drawn. Three symbols (left arrow, black square and right arrow) will be added at the bottom right of the plot, for interactions with the user (see details below)
... one or more of the following plot parameters: "cex", "cex.axis", "cex.lab", "cex.main", "font", "font.axis", "font.lab", "font.main", "line.xlab", "line.ylab", "line.lab", "line.main", "adj.main", "xlim", "ylim", "tcl", "mgp.x", "mgp.y"

Details

The third argument of the plot.calciomatic function is an integer n comprised between 1 and 5. The plot drawn directly depends on the value of n, as follows:

Value

When ask is set to its default FALSE value, a plot is drawn, and nothing else is returned by the function. If ask is set to TRUE, the action to execute is returned, as a character string

Author(s)

Sebastien Joucla sebastien.joucla@parisdescartes.fr

See Also

plot.fluo_rawdata, plot.ratio_fit, plot.ratio_fit_list, plot.direct_fit

Examples

## Plot simulated fluorescence raw data. A simpler way would be to
## use the high-level plot.fluo_rawdata function, so, this example
## is just for the sake of the form

## Parameters of the monoexponential calcium transient
tOn  <- 1
Time <- seq(0,12,length.out=160)
Ca0  <- 0.10
dCa  <- 0.25
tau  <- 1.5

## Calibrated parameters
R_min <- list(value=0.136, mean=0.136, se=0.00363, USE_se=TRUE)
R_max <- list(value=2.701, mean=2.701, se=0.151,   USE_se=TRUE)
K_eff <- list(value=3.637, mean=3.637, se=0.729,   USE_se=TRUE)
K_d   <- list(value=0.583, mean=0.583, se=0.123,   USE_se=TRUE)

## Experiment-specific parameters
nb_B    <- 1
B_T     <- 100.0
T_340   <- 0.015
T_380   <- 0.006
P       <- 200
P_B     <- 200
phi     <- 2
S_B_340 <- 30
S_B_380 <- 80

## Create a monoexponential calcium decay
Ca <- caMonoExp(t = Time, tOn = tOn,
                Ca0 = Ca0, dCa = dCa, tau = tau)

## Simulate the corresponding ratiometric experiment
df <- ratioExpSimul(nb_B    = nb_B,
                    Ca      = Ca,
                    R_min   = R_min,
                    R_max   = R_max,
                    K_eff   = K_eff,
                    K_d     = K_d,
                    B_T     = B_T,
                    phi     = phi,
                    S_B_340 = S_B_340,
                    S_B_380 = S_B_380,
                    T_340   = T_340,
                    T_380   = T_380,
                    P       = P,
                    P_B     = P_B,
                    ntransients = 1,
                    G       = 1,
                    s_ro    = 0)

## Extract relevant data from the data frame
Time <- with(df,Time[!is.na(Time) & lambda==340])
adu_340 <- with(df,adu[!is.na(Time) & lambda==340])
adu_380 <- with(df,adu[!is.na(Time) & lambda==380])

## Plot the fluorescence data in the same figure
par(oma = c(4, 0, 1, 0), mar = c(0, 7, 2, 0))
layout(matrix(c(1,2),ncol=1))

plotCalciOMatic(x = Time, y = adu_340, n = 1, xlab = "",
                ylab = expression(paste(adu[340], "(photons)")),
                lab = "A", main = "Fluorescence Raw Data")

plotCalciOMatic(x = Time, y = adu_380, n = 1, xlab = "Time (s)",
                ylab = expression(paste(adu[380], " (photons)")),
                lab = "B", main = "")

[Package CalciOMatic version 1.1-3 Index]