File: test-multiple-page.R

package info (click to toggle)
r-bioc-complexheatmap 2.14.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,632 kB
  • sloc: makefile: 5
file content (25 lines) | stat: -rw-r--r-- 494 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
library(circlize)
library(ComplexHeatmap)
library(GetoptLong)

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()