-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to remove or reposition the RowSideColors annotation legend? #236
Comments
Please include your actual code as a reproducible example, not a screenshot of your code |
I'm really sorry. Late Friday at work had me lose my good manners... Here you go with a reprex: library(magrittr)
set.seed(123)
heatmap_input <- tibble::tibble(x = runif(3),
y = runif(3),
z = runif(3),
sector = c("a", "b", "c")) %>%
tibble::column_to_rownames(var = "sector") %>%
as.matrix()
row_side <- runif(3)
col_side <- runif(3) %>%
setNames(colnames(heatmap_input))
main_Heatmap <- heatmaply::heatmaply(
heatmap_input,
row_side_colors = tibble::tibble("<b>Sector Relevance Total</b>" = row_side),
col_side_colors = tibble::tibble("<b>Covered Portfolio NAV</b>" = col_side),
#col_side_palette = colCopheneticCor,
#row_side_palette = rowCopheneticCor,
dendrogram = "none",
#custom_hovertext = text_mat_main,
plot_method = c("plotly"),
hide_colorbar = TRUE) %>%
plotly::layout(showlegend = FALSE,
annotations = list(
visible = FALSE
)) Created on 2020-12-14 by the reprex package (v0.3.0) Many thanks for looking into this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello!
When creating a plot with a lot of RowSideColors, the RowSideColors legend tends to get a bit unwieldy and can overlap with the actual legend. I've found that setting plot_method = "plotly" helps compact the RowSideColors annotations, but again when there is a long list it ends up pushing the legend to weird parts of the plot. Is there a way to remove the Row annotations legend entirely while keeping the RowSideColors?
Thanks!
The text was updated successfully, but these errors were encountered: