import numpy as np
import matplotlib.pyplot as plt
= np.arange(0, 2, 0.01)
r = 2 * np.pi * r
theta = plt.subplots(
fig, ax = {'projection': 'polar'}
subplot_kw
)
ax.plot(theta, r)0.5, 1, 1.5, 2])
ax.set_rticks([True)
ax.grid( plt.show()

February 26, 2023
So I have had my first experience with creating dynamic documents in Quarto. It has been a pleasant experience. I could use some of my RMarkdown und knitr skills and like that it is a program independent of R and RStudio. Working in VS Code to create a blog on Things I Learned worked well.
Only working with Python was really challenging. For some time several attempts to find the local Python version in the env
folder did not work. quarto check
found the respective Python version but it was not used when I rendered the document. At the end it was simply the header option jupyter: python3
in the qmd-document that did the trick.
Rendering a document with Python and R cells remained a challenge. Again, it was an option that was missing. Setting #| python.reticulate: false
in a Python cell solved the issue.
Many of my Python struggles in Quarto may have been related to the reticulate R package.
To get there I also created a Dockerfile
to have an OS independent version of Quarto. That was another challenge until I first found a Rocker configuration that worked with Python. It is a whopping 4.5 GB image but incudes Latex to create pdf-files.
Later I did some more experimenting with Docker and created a Jupyter Lab Docker image that is also quite large with almost 5 GB. In addition, I created a smaller image that includes only a minimal Python and Jupyter Lab. At least this one is a little smaller than 1 GB.
I’ll try to work with the local Quarto versions mainly but it is good to have OS independent Docker versions as well.
Here is a Quarto Guide demonstration of a line plot on a polar axis, see Figure 1.