Plot method
# S3 method for pkgndep
plot(x, pkg_fontsize = 10*cex, title_fontsize = 12*cex, legend_fontsize = 8*cex,
fix_size = !dev.interactive(), unit = "in", cex = 1, ...)
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?
The unit of the returned figure width and height.
A factor multiplicated to all font sizes.
Other arguments.
A list of two units that correspond 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.
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 = as.numeric(size[1]) height = as.numeric(size[2]) 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