
Last chance! 50% off unlimited learning
Sale ends in
S3 methods for plotting "Intervals"
and "Intervals_full"
objects.
# S3 method for Intervals
plot(x, y, ...)
# S3 method for Intervals_full
plot(
x, y = NULL,
axes = TRUE,
xlab = "", ylab = "",
xlim = NULL, ylim = NULL,
col = "black", lwd = 1,
cex = 1,
use_points = TRUE,
use_names = TRUE,
names_cex = 1,
...
)# S4 method for Intervals,missing
plot(x, y, ...)
# S4 method for Intervals_full,missing
plot(x, y, ...)
# S4 method for Intervals,ANY
plot(x, y, ...)
# S4 method for Intervals_full,ANY
plot(x, y, ...)
None.
An "Intervals"
or "Intervals_full"
object.
Optional vector of heights at which to plot intervals. If omitted,
y
will be automatically computed to generate a compact plot
but with no overlap.
As for plot.default
.
As for plot.default
.
As for plot.default
.
As for plot.default
.
If not explicitly supplied, ylim
is set to the maximum value
required for intervals which are visible for the given xlim
.
Color used for segments and endpoint points and interiors. Recycled if necessary.
Line width for segments. See par
.
Endpoint magnification. Only relevant if use_points =
TRUE
. See par
.
Should points be plotted at interval endpoints?
Should rownames(x)
by used for segment labels in the plot?
Segment label magnification. Only relevant if use_names =
TRUE
.
Other arguments for plot.default
.
Intervals with NA
for either endpoint are not
plotted. Vertical placement is on the integers, beginning with 0.
# Note plot symbol for empty interval in 'from'.
from <- Intervals(
matrix(
c(
2, 8,
8, 9,
6, 9,
11, 12,
3, 3
),
ncol = 2, byrow = TRUE
),
closed = c( FALSE, TRUE ),
type = "Z"
)
rownames(from) <- c("a","b","c","d","e")
to <- Intervals(
matrix(
c(
2, 8,
3, 4,
5, 10
),
ncol = 2, byrow = TRUE
),
closed = c( FALSE, TRUE ),
type = "Z"
)
rownames(to) <- c("x","y","z")
empty(from)
plot(
c(from,to),
col = rep(1:2, c(nrow(from), nrow(to)))
)
legend("topright", c("from","to"), col=1:2, lwd=1)
# More intervals. The maximal height shown is adapted to the plotting
# window.
B <- 10000
left <- runif( B, 0, 1e5 )
right <- left + rexp( B, rate = 1/10 )
x <- Intervals( cbind( left, right ) )
plot(x, use_points=FALSE)
plot(x, use_points=FALSE, xlim = c(0, 500))
Run the code above in your browser using DataLab