| plot.pkgDepGraph {miniCRAN} | R Documentation |
Plots a package dependency graph.
## S3 method for class 'pkgDepGraph' plot(x, pkgsToHighlight, main = paste(attr(x, "pkgs"), collapse = ", "), legendPosition = c(-1.2, -1), shape = "circle", vertex.size = 8, cex = 1, ...)
x |
pkgDepGraph object |
pkgsToHighlight |
Optional character vector with names of package to hightlight. If missing, defaults to packages used in original call to |
main |
Title of plot |
legendPosition |
Numeric vector of length 2, indicating (x, y) position of edge legend. Both values should be in the range |
shape |
Shape of edge. See |
vertex.size |
Size of vertex shape. |
cex |
Vertex label size. |
... |
Ignored |
Other dependency functions: basePkgs,
makeDepGraph, pkgDep
tags <- "chron"
# Plot using defaults
pdb <- cranJuly2014
## Not run:
pdb <- pkgAvail(
repos = c(CRAN = getOption("minicran.mran")),
type = "source"
)
## End(Not run)
dg <- makeDepGraph(tags, availPkgs = pdb , includeBasePkgs = FALSE,
suggests = TRUE, enhances = TRUE)
set.seed(42);
plot(dg)
# Move edge legend to top left
set.seed(42);
plot(dg, legendPosition = c(-1, 1))
# Change font size and shape size
set.seed(42);
plot(dg, legendPosition = c(-1, 1), vertex.size = 20, cex = 0.5)
# Move vertex legend to top right
set.seed(42);
plot(dg, legendPosition = c(1, 1), vertex.size = 20, cex = 0.5)