diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 0bbb98b4f5..f966c8f455 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -5055,6 +5055,7 @@ RMarkdown: codemirror_mode: gfm codemirror_mime_type: text/x-gfm extensions: + - ".qmd" - ".rmd" tm_scope: source.gfm language_id: 313 diff --git a/samples/RMarkdown/example.qmd b/samples/RMarkdown/example.qmd new file mode 100644 index 0000000000..489f62bb70 --- /dev/null +++ b/samples/RMarkdown/example.qmd @@ -0,0 +1,27 @@ +--- +title: "matplotlib demo" +format: + html: + code-fold: true +jupyter: python3 +--- + +For a demonstration of a line plot on a polar axis, see @fig-polar. + +```{python} +#| label: fig-polar +#| fig-cap: "A line plot on a polar axis" + +import numpy as np +import matplotlib.pyplot as plt + +r = np.arange(0, 2, 0.01) +theta = 2 * np.pi * r +fig, ax = plt.subplots( + subplot_kw = {'projection': 'polar'} +) +ax.plot(theta, r) +ax.set_rticks([0.5, 1, 1.5, 2]) +ax.grid(True) +plt.show() +```