plot.embryo2d: Plot 'embryo2d' object

Description Usage Arguments Details Value Examples

View source: R/volumetric.R View source: R/plot.R

Description

The function plots ‘embryo2d’ object in different ways: (1) 2d color levelplot of intesities, (2) 3d plot of intensities and (3) 1d plots of sections along coordinate (AP or DV) directions.

Usage

1
2
3
4
5
## S3 method for class 'embryo2d'
plot(x, type = c("nuclei-2d", "field-2d",
                                    "field-section", "nuclei-section",
                                    "field-3d", "nuclei-3d"),
                                  ...)

Arguments

x

object of class ‘embryo2d’

type

plot type (see Details)

...

further arguments passed to plotting function

Details

A lot of drawing methods, 1d, 2d, 3d, for regular grid and for orginal nuclear centers. Type variants:

nuclei-2d

is 2d nuclei plot. One point for one nucleus. Also one can pass the following arguments: voronoi — logical whether plot Voronoi diagram for nuclei, 'TRUE' by default; col — argument for colorRampPalette, this pallete used for Voronoi diagram, color intensity corresponds to nuclei intensity value, greyscale pallete by default

field-2d

is Lattice levelplot for intensity regularization. Argument col defines color palette (see previous item)

field-section

is Lattice xyplot for of section for intensities in regular grid. Additional arguments: at, units — units for at ('percent' or 'original'), coord — 'x' or 'y', 'y' by default

nuclei-section

is Lattice xyplot of section for intensities in nucleus. Additional arguments: at, units, coord — see previous item, tolerance — is the half-width of the strip around the section position

field-3d

is 3d rgl plot, nuclei are depicted by colored spheres, color intensity corresponds to nuclei intensity value. Additional argument col — character vector of two values, denotes colors for the lowest and the highest intensities correspondingly

nuclei-3d

is 3d rgl surface plot, values in regular grid are depicted, color intensity corresponds to nuclei intensity value. Additional argument col — see previous item

Other parameters are passed to plot functions.

Value

‘trellis’ object (see lattice) for 2d plots, a vector of object IDs for 3d plots.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
xlim <- c(22, 88)
ylim <- c(32, 68)
L <- c(15, 15)
good <- 3

file <- system.file("extdata/data", "ab16.txt", package = "BioSSA")
df <- read.emb.data(file)

bss <- BioSSA(cad ~ AP + DV,  data = df,
              L = L,
              step = 0.5,
              xlim = xlim, ylim = ylim)


# Reconstruction of elementary components
rec.elem <- reconstruct(bss, groups = 1:6)
plot(plot(rec.elem))

# Sections for testing the reconstruction quality
rec <- reconstruct(bss, groups = list(good = 1:good))
p.ny <- plot(attr(rec, "series"), type = "nuclei-section", at = 50, coord = "y", tol = 5)
p.fy2 <- plot(rec$good, type = "field-section", at = 50, coord = "y")

# y-sections
pls <- list()
pls[[1]] <- p.ny + p.fy2
pls[[2]] <- plot(residuals(bss, 1:good), type = "nuclei-section",
                 at = 50, coord = "y", tol = 5,
                 ref = TRUE, col = "blue")

print(pls[[1]], split = c(1, 1, 2, 1), more = TRUE)
print(pls[[2]], split = c(2, 1, 2, 1))


# Dependence of noise on trend
plot(bss, type = "residuals", model = "multiplicative", groups = 1:good)

# 3d-figure of reconstruction
plot(rec$good, type = "nuclei-3d", col = c("blue", "red"))

# 2d-figures with triangulation
plot(rec$good, type = "nuclei-2d")

BioSSA/BioSSA documentation built on Dec. 28, 2017, 9:27 p.m.