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

use {ggtext} to customize labels in geom_treemap_text() #37

Open
gruggeri opened this issue Feb 25, 2020 · 4 comments
Open

use {ggtext} to customize labels in geom_treemap_text() #37

gruggeri opened this issue Feb 25, 2020 · 4 comments

Comments

@gruggeri
Copy link

Hi,

Great package! I would like to be able to use {ggtext} to customize the geom_treemap_text().
For instance, when using HTML in the title of a plot, I would use the following code to render it:

+ theme(plot.title = ggtext::element_markdown())

Would it be possible to implement these features for assessing the text rendered with geom_treemap_text()?

Thanks

@wilkox
Copy link
Owner

wilkox commented Feb 29, 2020

Hi Giulia, thanks for your interest in treemapify and for the suggestion!

This is definitely a planned feature and I hope to add it soon. It requires an update to ggfittext, the package that handles text drawing in treemapify, to use the rich text grobs from the gridtext package (which power the rich text features in ggtext).

@gruggeri
Copy link
Author

gruggeri commented Mar 2, 2020

Awesome! Thanks for your reply! Looking forward then!

@dickoa
Copy link

dickoa commented Dec 17, 2021

Hi @wilkox,

Thanks for this great package. I wanted to know if you have now a way to rich text in geom_treemap_text.
Let me know if there's something we can do to help.

Best,

@wilkox
Copy link
Owner

wilkox commented Dec 28, 2021

@dickoa I haven't yet added rich text to treemapify as I'm not totally happy with the implementation in ggfittext. However, as a workaround you can use the treemapify() function to generate a set of treemap tile coordinates, which you can then use to draw rich text labels with ggfittext's geom_fit_text().

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