tests_not_run/test-multiple-page.R

m = matrix(rnorm(100), 10)

postscript("test.ps")
lgd = Legend(labels = c("a", "b", "c"))
draw(Heatmap(m), heatmap_legend_list = list(lgd))
dev.off()

check_pages = function() {
	lines = readLines("test.ps")
	print(lines[length(lines)-1])
	invisible(file.remove("test.ps"))
}

check_pages()

postscript("test.ps")
ha = HeatmapAnnotation(foo = 1:10, bar = anno_points(1:10))
Heatmap(m, top_annotation = ha)
dev.off()

check_pages()
zhongmicai/complexHeatmap documentation built on May 7, 2019, 6:11 a.m.