Skip to content
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

Adding more than 2 heatmaps side-by-side not working #123

Open
jantusan opened this issue Jun 30, 2023 · 3 comments
Open

Adding more than 2 heatmaps side-by-side not working #123

jantusan opened this issue Jun 30, 2023 · 3 comments

Comments

@jantusan
Copy link

Hello,

Thank you for the useful package! I am trying to add heatmaps side by side with the + function of ComplexHeatmap, but it doesn't work if it is more than 2 heatmaps

p_heatmap = heatmap(mtcars_tidy, `Car name`, Property, Value, scale = "row") 

# works and throws the expected warning
p_heatmap + p_heatmap
#> Warning: Heatmap/annotation names are duplicated: Value

# gives an additional warning and an error
p_heatmap + p_heatmap + p_heatmap
#> Warning: Heatmap/annotation names are duplicated: Value
#> Warning: Incompatible methods ("+.AdditiveUnit", "+.InputHeatmap") for "+"
#> Error in p_heatmap + p_heatmap + p_heatmap : non-numeric argument to binary operator

is there a way to add more than 2 heatmaps side-by-side like in ComplexHeatmap?

@mschubert
Copy link

This also fails for me:

p_heatmap + patchwork::plot_spacer()
# Error in p_heatmap + plot_spacer() :
#   non-numeric argument to binary operator
# In addition: Warning message:
# Incompatible methods ("+.InputHeatmap", "+.gg") for "+"

@stemangiola
Copy link
Owner

stemangiola commented Oct 19, 2023

Sorry, for the slowness of the response I have been a little overwhelmed with work recently.

@stemangiola
Copy link
Owner

Just to mention that if someone would like to take this challenge and propose a fix, this would be more than welcome. This could be the introduction to the tidyomics project and get involved in upcoming papers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants