Dynamic layout #954
-
Let's say I have 40 PNG figures representing 4 measures for 10 different countries. What I want to do is print the title of the figures, and then the four figures in a 2x2 matrix. Is there a way of doing this in a The trouble I'm having is that if I define the cell layout as [[1], [1,1], [1,1]], the first country comes right, but instead of repeating the pattern of 1, [1,1], [1,1], Quarto continues the pattern with [1,1]s until the end, so the title of the second country takes the place that I expected to have the first figure.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
If you want the headings to be programatically generated and all part of the same figure, you may have to resort to a nested layout and generating the subfigures programatically as well. You can inspect the markdown that quarto generates for a figure and recreate that from your python code (https://quarto.org/docs/computations/execution-options.html#intermediates) |
Beta Was this translation helpful? Give feedback.
If you want the headings to be programatically generated and all part of the same figure, you may have to resort to a nested layout and generating the subfigures programatically as well. You can inspect the markdown that quarto generates for a figure and recreate that from your python code (https://quarto.org/docs/computations/execution-options.html#intermediates)