gallery

Arrange thumbnails as a gallery

source

emb_img

 emb_img (nb_path:str, label:str, caption:str='', anchor='#example',
          size=(150, 150))

Embed a thumbnail image as a markdown cell.

Type Default Details
nb_path str the path to the notebook
label str the label indicating the cell where the plot is, see https://quarto.org/docs/authoring/notebook-embed.html#code-cell-options for an example.
caption str the caption, will be inferred from label if not specified.
anchor str #example anchor tag in source page, this defaults to #example for plotnine: https://plotnine.readthedocs.io
size tuple (150, 150) size of the thumbnail
Returns str

We can embed an image with markdown like this:

md = emb_img(nb_path='test_nbs/geom_col.ipynb', 
             label='two_variable_bar_plot')
print(md)