How do I resize a gt
table
#9612
-
DescriptionHi I've created a That does seem to work, but I don't understand how this code, which I thought would just save the png to file, also causes it to be rendered in the pdf.
I therefore am not sure how/where to add code to play with the size of the PNG version of the table. Grateful for any guidance. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Sorry...typo above..., should read |
Beta Was this translation helpful? Give feedback.
-
It's a bit unclear what your Quarto document looks like without having the code. FYI, you don't need gtsave(tbl_msiassay_gt, here("figures", "fig_msiassay.png")) The above only writes the image. For question regarding this function, as suggested, go to Now the image can be included in your Quarto document, using basic markdown syntax for figures, where you can set the dimension. You can share a self-contained "working" (reproducible) Quarto document using the following syntax, i.e., using more backticks than you have in your document (usually four If you have multiple files (and if it is absolutely required to have multiple files), please share as a Git repository.
Additionally and if not already given, please share the output of |
Beta Was this translation helpful? Give feedback.
-
Just as a side-note, I believe recent versions have introduced a grid graphics backend, so you could try that to embed a vector (pdf) image rather than a raster: https://gt.rstudio.com/reference/as_gtable.html?q=grid#ref-usage |
Beta Was this translation helpful? Give feedback.
It's a bit unclear what your Quarto document looks like without having the code.
FYI, you don't need
file.path
if you are usinghere
(that's the point of usinghere
).The above only writes the image. For question regarding this function, as suggested, go to
gt
documentation/repository.Now the image can be included in your Quarto document, using basic markdown syntax for figures, where you can set the dimension.
You can share a self-contained "working" (reproducible) Quarto document using the following syntax, i.e., using more backticks than you have in your document (usually four
````
).See https://quarto.org/bug-reports.html#…