Plot method
# S3 method for pkgndep
plot(x, pkg_fontsize = 10, title_fontsize = 12, legend_fontsize = 8,
fix_size = !dev.interactive(), ...)
The object from pkgndep
.
Fontsize for the package names.
Fontsize for the titles.
Fontsize for the legends.
Should the rows and columns in the heatmap have fixed size?
Other arguments.
A length-tow unit
object which corresponds to the width and height of the plot.
If fix_size
is set to TRUE
. The size of the whole plot can be obtained by:
size = plot(x, fix_size = TRUE)
where size
is a unit
object with the width and height of the whole heatmap, in unit mm
.
If you want to save the plot in to e.g. a PDF file that has the same size of the heatmap, you
need to make the plot twice. First save the plot into a null device, just to obtain the size
of the plot:
pdf(NULL) # a null device size = plot(x, fix_size = TRUE) dev.off() width = convertX(size[1], "inches", valueOnly = TRUE) height = convertY(size[2], "inches", valueOnly = TRUE) pdf(..., width = width, height = height) plot(x) dev.off()
If there are no dependency packages stored in x
, NULL
is returned.
# NOT RUN {
# See examples in `pkgndep()`.
# }
Run the code above in your browser using DataLab