Implementing dynamic figure captions for multiple heatmaps within a loop in a Quarto document. #11853
-
Issue DescriptionBackgroundI am using Quarto to generate a report where I need to dynamically generate multiple heatmaps within a single R code block using the Attempted SolutionsI have tried the following methods to achieve dynamic figure captions:
ProblemHow can I dynamically set Expected SolutionI hope to be able to set individual, dynamically generated figure captions in Quarto, especially when using loops or similar dynamic structures. If the current version of Quarto does not support this, I would like to know if there are plans to include this functionality in future updates. the following is my code
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Could you share a small self-contained "working" (reproducible) example to work with, i.e., a complete Quarto document or a Git repository? The goal is to make it as easy as possible for us to recreate your problem so that we can fix it: please help us help you! Thanks. 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.
-
Thank you very much for your quick answer, but after following the tutorial you gave for setting up
|
Beta Was this translation helpful? Give feedback.
-
The problem is solved, it takes me 16 hours, thank you very much. I write some to make it usefull. firstly, secondly, my Unknown quantity fig shown was strange,Cross referencing is invalid, because its a pheathot object, I try Direct use, finally I use knit_child insert these pig by iwalk,its successfull !!! its so cool, quarto is a Magical tools! |
Beta Was this translation helpful? Give feedback.
Sorry but there is no way we can use your complex, not English, and not reproducible code.
Could you share a small self-contained "working" (reproducible) example to work with, i.e., a complete Quarto document or a Git repository? The goal is to make it as easy as possible for us to recreate your problem so that we can fix it: please help us help you! Thanks.
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#small-is-beautiful-aim-for-a-single-document-with-10-lines.
If you have multiple files (and if it is absolutely req…