quarto

ModuleNotFoundError: No module named 'nbformat'

ModuleNotFoundError: No module named 'nbformat' Question: I would like to run python in a Quarto document. I followed the docs about installing and using python in Quarto, but the error stays. Here is some reproducible code: — title: "matplotlib demo" format: html: code-fold: true jupyter: python3 — For a demonstration of a line plot on …

Total answers: 1

Generate one plot per revealjs slide in python for loop using Quarto

Generate one plot per revealjs slide in python for loop using Quarto Question: I’m trying to generate a slide deck consisting of several plots using Quarto with revealjs output format. I need to generate these plots with plotly through a loop, but that is messing up my output. I’m getting the plots lined up vertically, …

Total answers: 1

Reference parameter in figure caption with Quarto

Reference parameter in figure caption with Quarto Question: Is there a way to reference a parameter in a Quarto figure or table caption? In the example below, I am able to reference my input parameter txt in a regular text block, but not in a figure caption. In the figure caption, only the raw text …

Total answers: 1

How to PassOptionsToPackage from inside a quarto document?

How to PassOptionsToPackage from inside a quarto document? Question: Consider the following quarto document: — title: "Some title" author: X date: "2022" format: pdf: number-sections: true fontsize: 12 pt papersize: A4 fig-pos: ‘H’ geometry: "left=2.54cm,right=2.54cm,top=2.54cm,bottom=2.54cm" include-in-header: text: | usepackage[font=small]{caption} usepackage{float} usepackage[table]{xcolor} engine: jupyter jupyter: r-reticulate — begin{center} begin{tabular}{|c|c|} hline 1 & 2tabularnewline hline cellcolor{blue} 3 …

Total answers: 1

fig-width has no effect in a quarto document

fig-width has no effect in a quarto document Question: Consider the following code: — title: "Untitled" format: pdf — “`{python} #| echo: false #| fig-align: center #| fig-width: 1cm import matplotlib.pyplot as plt x = [1, 2] y = [2, 3] plt.plot(x,y) “` The parameter fig-width has no effect whatever the chosen width. Could someone …

Total answers: 1

How to visualize a Pandas Dataframe in R chunk Quarto?

How to visualize a Pandas Dataframe in R chunk Quarto? Question: I was wondering if there is an option to use a Pandas dataframe created in a Python chunk, in your R chunk to visualize the dataframe. Here is some reproducible code: — title: "How to use Pandas Dataframe in R chunk" format: html engine: …

Total answers: 1