Skip to content

Commit a6eb608

Browse files
committed
Add a matplotlib hy example, reproduces a weird hanging issue
1 parent 03a10b9 commit a6eb608

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

dev/hy/matplot-demo.hy

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
(+ 10 20)
2+
3+
(import matplotlib)
4+
(.use matplotlib "Qt5Agg")
5+
(.rcdefaults matplotlib)
6+
(.use matplotlib "Qt5Agg")
7+
8+
(import [matplotlib [pyplot]])
9+
10+
(.ion pyplot)
11+
(pyplot.style.use "default")
12+
(pyplot.style.use "fivethirtyeight")
13+
14+
(defn test []
15+
"Plot a list."
16+
(setv fig (.figure pyplot))
17+
(setv axes (.add_subplot fig))
18+
(.plot axes (list (range 20)))
19+
{:figure fig :axes axes})
20+
21+
(test)

0 commit comments

Comments
 (0)