Add replite console to the users docs · matplotlib/matplotlib@b29a69d · GitHub
Skip to content

Commit b29a69d

Browse files
committed
Add replite console to the users docs
1 parent beba0de commit b29a69d

3 files changed

Lines changed: 19 additions & 1 deletion

File tree

doc/conf.py

Lines changed: 1 addition & 0 deletions

doc/users/index.rst

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,22 @@
77
Users guide
88
###########
99

10+
Try Matplotlib directly in this documentation!
11+
12+
.. replite::
13+
:kernel: python
14+
:height: 500px
15+
16+
import matplotlib.pyplot as plt
17+
import numpy as np
18+
19+
x = np.linspace(0, 2 * np.pi, 200)
20+
y = np.sin(x)
21+
22+
fig, ax = plt.subplots()
23+
ax.plot(x, y)
24+
plt.show()
25+
1026
General
1127
#######
1228

@@ -29,7 +45,7 @@ Tutorials and examples
2945
../tutorials/index.rst
3046
../gallery/index.rst
3147

32-
Reference
48+
Reference
3349
#########
3450

3551
.. toctree::

environment.yml

Lines changed: 1 addition & 0 deletions

0 commit comments

Comments
 (0)