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

[Help] Bigger fontsize causes cutted text #129

Open
MatteoRiva95 opened this issue May 20, 2024 · 1 comment
Open

[Help] Bigger fontsize causes cutted text #129

MatteoRiva95 opened this issue May 20, 2024 · 1 comment

Comments

@MatteoRiva95
Copy link

Hello everyone,

I am trying to write bigger text in my heatmap, but using a fontsize of 30 it causes this:

image

As you can see, the "M" of "Myofibroblasts" is cutted.
Is there a method to "oblige" the heatmap to adapt to the fontsize? I would like to be free to use the size I want.
Moreover, do you know a method to have a bigger legend, without having the letters cutted, please?

image

I am using this code:

text_size <- ggfun::gpar(fontsize=30)
plot <- tidyHeatmap::heatmap(.data=results, .row=Sender, .column=Receiver, .value=Weight,
palette_value=c("white","#d0d1e6","#045a8d"), show_heatmap_legend=T,
row_names_gp=text_size, column_names_gp=text_size, column_title_gp=text_size, row_title_gp=text_size) |>
tidyHeatmap::as_ComplexHeatmap() |>
ComplexHeatmap::draw(column_title = title,
column_title_gp = text_size)

Thank you so much in advance!

@stemangiola
Copy link
Owner

In the README there is

 heatmap(
        `Car name`, Property, Value,    
        scale = "row", 
        row_names_gp = gpar(fontsize = 7),
        column_names_gp = gpar(fontsize = 7),
        column_title_gp = gpar(fontsize = 7),
        row_title_gp = gpar(fontsize = 7)
    ) 
    ```
    
    does it help?

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

2 participants