Closed lbenz730 closed 2 years ago
Howdy! This is already largely possible via gt::ggplot_image()
https://gt.rstudio.com/reference/ggplot_image.html
It uses text_transform()
+ ggplot_image()
to embed user-defined plots.
Oh thanks for point this out. I agree the functionality requested would likely be mostly redundant
Hi Tom,
Thanks for all your hard work on the gtExtras package. I am wondering if it would be fairly straightforward to add a function that makes a column of user supplied charts a column in the table w/in a gt. I have done an example of this here, by saving image files out (via
ggsave
) and then manually loading them in and usingtext_transform
to create a column with the graphs as cells.The motivation behind such a function would be allow give a lot of flexibility to the user, and not all charts would need to be the same type, nor would the gtExtras package be responsible for the creation of the chart(s) in question.
I am not exactly certain how this would work in your API but I imagine something like the following steps:
text_transform
to create column of graphsSome challenges I would anticipate:
width
argument could be of use)I don't know what kind of effort this would require, and its definitely an enhancement request, not a bug. Thanks for all your efforts!
--Luke