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

Commit ac6e304

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

4 files changed

Lines changed: 20 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
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ dependencies:
3737
- pip:
3838
- mpl-sphinx-theme
3939
- sphinxcontrib-svg2pdfconverter
40+
- jupyterlite-sphinx
4041
# testing
4142
- coverage
4243
- flake8>=3.8

requirements/doc/doc-requirements.txt

Lines changed: 1 addition & 0 deletions

0 commit comments

Comments
 (0)