-
Notifications
You must be signed in to change notification settings - Fork 25
Labels
enhancementNew feature or requestNew feature or request
Description
Thank you for creating this fantastic package.
I want to display some values in the heatmap cells. Although he cell_fun or layer_fun argument from ComplexHeatmap can be added to tidyHeatmap::heatmap function to customize the display, I think it's much better and user-friendly to implement it in tidyHeatmap functions, similar to the layer_symbol() function.
The idea is to add freetext, color, and size to the layer_symbol() function. Then the layer_symbol() function is much more customizable. I have modified the code and created a pull request.
#107 (comment)
Here are some examples.
mtcars_tidy %>%
mutate(label = sprintf("%.1f", Value),
color_label = ifelse(Value > 0, "darkred", "white")) %>%
heatmap(`Car name`, Property, Value,
palette_value = colorRamp2(c(-3, 0, 3), c("blue", "white", "red"))) %>%
layer_symbol(Value > 1 | Value < -1,
symbol = "freetext",
freetext = label,
color = color_label,
size = 10)mtcars_tidy %>%
heatmap(`Car name`, Property, Value,
palette_value = colorRamp2(c(-3, 0, 3), c("blue", "white", "red"))) %>%
layer_symbol(Value > 1,
symbol = "freetext",
freetext = "+",
size = 10) %>%
layer_symbol(Value < -1,
symbol = "freetext",
freetext = "-",
size = 15) mtcars_tidy %>%
heatmap(`Car name`, Property, Value,
palette_value = colorRamp2(c(-3, 0, 3), c("blue", "white", "red"))) %>%
layer_point(Value < -1, color = "yellow")stemangiola
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request


