## Some trivial plot() examples for IntervalData objects
i1 <- IntervalData(0, 1)
i2 <- IntervalData(2, 3)
plot(i1) ## Plot only an interval vertically
plot(i1, layout = "horizontal") ## Plot only an interval horizontally
plot(i1, bounds = TRUE, mid = TRUE) ## Add bounds and remark mid-point
plot(i1, i2) ## Plot an interval on each axis
plot(i1, i2, bounds = TRUE) ## Add bounds
## Some trivial plot() examples for IntervalList objects
list1 <- IntervalList(c(0, 3, 2, 5, 6), c(4, 5, 4, 8, 7))
list2 <- IntervalList(c(3, 0, 3, 1, 4), c(7, 4, 6, 2, 6))
plot(list1) ## Plot an interval list vertically
plot(list1, layout = "horizontal") ## Plot an interval list horizontally
plot(list1, bounds = TRUE, mid = TRUE) ## Add bounds and remark mid-points
plot(list1, list2) ## Plot an interval list on each axis
plot(list1, list2, bounds = TRUE) ## Add bounds
## Further plot() customizations
plot(list1, bounds = TRUE, mid = TRUE,
main = "My one-dimensional interval-valued plot",
col = c("blue", "red"), lwd = 2)
plot(list1, list2, bounds = TRUE,
main = "My bidimensional interval-valued plot",
col = "blue", lwd = 2)
Run the code above in your browser using DataLab