osanseviero commited on
Commit
a7b6ea8
·
1 Parent(s): cec8c91

Create test.qmd

Browse files
Files changed (1) hide show
  1. test.qmd +27 -0
test.qmd ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: "matplotlib demo"
3
+ format:
4
+ html:
5
+ code-fold: true
6
+ jupyter: python3
7
+ ---
8
+
9
+ For a demonstration of a line plot on a polar axis, see @fig-polar.
10
+
11
+ ```{python}
12
+ #| label: fig-polar
13
+ #| fig-cap: "A line plot on a polar axis"
14
+
15
+ import numpy as np
16
+ import matplotlib.pyplot as plt
17
+
18
+ r = np.arange(0, 2, 0.01)
19
+ theta = 2 * np.pi * r
20
+ fig, ax = plt.subplots(
21
+ subplot_kw = {'projection': 'polar'}
22
+ )
23
+ ax.plot(theta, r)
24
+ ax.set_rticks([0.5, 1, 1.5, 2])
25
+ ax.grid(True)
26
+ plt.show()
27
+ ```