@@ -256,7 +256,7 @@ anno_simple = function(x, col, na_col = "grey",
256256 r = rle(value [index , i ])
257257 fill = map_to_colors(color_mapping , r $ values )
258258 if (is.null(gp $ col )) gp $ col = fill
259- grid.rect(x = (i - 0.5 )/ nc , y = 1 - cumsum(r $ lengths )/ n , height = r $ length / n , width = 1 / nc , just = " bottom" , gp = do.call(" gpar" , c(list (fill = fill ), gp )))
259+ grid.rect(x = (i - 0.5 )/ nc , y = 1 - cumsum(r $ lengths )/ n , height = r $ lengths / n , width = 1 / nc , just = " bottom" , gp = do.call(" gpar" , c(list (fill = fill ), gp )))
260260 }
261261 if (! is.null(pch )) {
262262 l = ! is.na(pch [, i ])
@@ -283,7 +283,7 @@ anno_simple = function(x, col, na_col = "grey",
283283 r = rle(value [index ])
284284 fill = map_to_colors(color_mapping , r $ values )
285285 if (is.null(gp $ col )) gp $ col = fill
286- grid.rect(x = 0.5 , y = 1 - cumsum(r $ lengths )/ n , height = r $ length / n , width = 1 , just = " bottom" , gp = do.call(" gpar" , c(list (fill = fill ), gp )))
286+ grid.rect(x = 0.5 , y = 1 - cumsum(r $ lengths )/ n , height = r $ lengths / n , width = 1 , just = " bottom" , gp = do.call(" gpar" , c(list (fill = fill ), gp )))
287287 }
288288 if (! is.null(pch )) {
289289 pch = pch [index ]
@@ -328,7 +328,7 @@ anno_simple = function(x, col, na_col = "grey",
328328 r = rle(value [index , i ])
329329 fill = map_to_colors(color_mapping , r $ values )
330330 if (is.null(gp $ col )) gp $ col = fill
331- grid.rect(cumsum(r $ lengths )/ n , y = (nc - i + 0.5 )/ nc , width = r $ length / n , height = 1 / nc , just = " right" , gp = do.call(" gpar" , c(list (fill = fill ), gp )))
331+ grid.rect(cumsum(r $ lengths )/ n , y = (nc - i + 0.5 )/ nc , width = r $ lengths / n , height = 1 / nc , just = " right" , gp = do.call(" gpar" , c(list (fill = fill ), gp )))
332332 }
333333 if (! is.null(pch )){
334334 l = ! is.na(pch [, i ])
@@ -355,7 +355,7 @@ anno_simple = function(x, col, na_col = "grey",
355355 r = rle(value [index ])
356356 fill = map_to_colors(color_mapping , r $ values )
357357 if (is.null(gp $ col )) gp $ col = fill
358- grid.rect(cumsum(r $ lengths )/ n , y = 0.5 , width = r $ length / n , height = 1 , just = " right" , gp = do.call(" gpar" , c(list (fill = fill ), gp )))
358+ grid.rect(cumsum(r $ lengths )/ n , y = 0.5 , width = r $ lengths / n , height = 1 , just = " right" , gp = do.call(" gpar" , c(list (fill = fill ), gp )))
359359 }
360360 if (! is.null(pch )) {
361361 pch = pch [index ]
0 commit comments