Browse code

update

Zuguang Gu authored on 28/07/2022 07:52:06
Showing 3 changed files

... ...
@@ -228,7 +228,7 @@ setMethod(f = "draw_heatmap_body",
228 228
             }
229 229
             attr(image, "width") = heatmap_width_pt
230 230
             attr(image, "height") = heatmap_height_pt
231
-            assign(".image", image, envir = .GlobalEnv)
231
+            # assign(".image", image, envir = .GlobalEnv)
232 232
         }
233 233
         ########################
234 234
 
... ...
@@ -578,7 +578,7 @@ heatmap.2 = function(x,
578 578
     nbr <- length(breaks)
579 579
     ncol <- length(breaks)-1
580 580
 
581
-    if(class(col)=="function") col <- col(ncol)
581
+    if(inherits(col, "function")) col =col(ncol)
582 582
     #### until here ###
583 583
     
584 584
     n_col = ncol
... ...
@@ -1,3 +1,6 @@
1
+
2
+library(ComplexHeatmap)
3
+
1 4
 words = sapply(1:30, function(x) strrep(sample(letters, 1), sample(3:10, 1)))
2 5
 grid.newpage()
3 6
 grid.textbox(words, gp = gpar(fontsize = runif(30, min = 5, max = 30)))