-
Notifications
You must be signed in to change notification settings - Fork 228
/
test-interactive.R
47 lines (34 loc) · 954 Bytes
/
test-interactive.R
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
if(0) {
m = matrix(rnorm(100), 10)
rownames(m) = 1:10
colnames(m) = 1:10
ht = Heatmap(m)
ht = draw(ht)
selectArea(ht)
ht = Heatmap(m, row_km = 2, column_km = 2)
ht = draw(ht)
selectArea(ht)
ht = Heatmap(m, row_km = 2, column_km = 2) + Heatmap(m, row_km = 2, column_km = 2)
ht = draw(ht)
selectArea(ht)
pdf("~/test.pdf")
ht = Heatmap(m)
ht = draw(ht)
selectArea(ht, pos1 = unit(c(1, 1), "cm"), pos2 = unit(c(4, 4), "cm"), verbose = TRUE)
set.seed(123)
ht = Heatmap(m, row_km = 2, column_km = 2)
ht = draw(ht)
selectArea(ht, pos1 = unit(c(1, 1), "cm"), pos2 = unit(c(8, 8), "cm"), verbose = TRUE)
dev.off()
png("~/test-1.png")
ht = Heatmap(m)
ht = draw(ht)
selectArea(ht, pos1 = unit(c(1, 1), "cm"), pos2 = unit(c(4, 4), "cm"), verbose = TRUE)
dev.off()
png("~/test-2.png")
set.seed(123)
ht = Heatmap(m, row_km = 2, column_km = 2)
ht = draw(ht)
selectArea(ht, pos1 = unit(c(1, 1), "cm"), pos2 = unit(c(8, 8), "cm"), verbose = TRUE)
dev.off()
}