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

Commit a2343cb

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

5 files changed

Lines changed: 23 additions & 2 deletions

File tree

doc/conf.py

Lines changed: 1 addition & 0 deletions

doc/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ Installation
3636
3737
Further details are available in the :doc:`Installation Guide <users/installing/index>`.
3838

39-
4039
******************
4140
Learning resources
4241
******************

doc/users/index.rst

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,25 @@ General
1919
faq/index.rst
2020
resources/index.rst
2121

22+
Live example
23+
############
24+
25+
Try Matplotlib directly in this documentation!
26+
27+
.. replite::
28+
:kernel: python
29+
:height: 600px
30+
31+
import matplotlib.pyplot as plt
32+
import numpy as np
33+
34+
x = np.linspace(0, 2 * np.pi, 200)
35+
y = np.sin(x)
36+
37+
fig, ax = plt.subplots()
38+
ax.plot(x, y)
39+
plt.show()
40+
2241
Tutorials and examples
2342
######################
2443

@@ -29,7 +48,7 @@ Tutorials and examples
2948
../tutorials/index.rst
3049
../gallery/index.rst
3150

32-
Reference
51+
Reference
3352
#########
3453

3554
.. 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>=0.4.3
4041
# testing
4142
- coverage
4243
- flake8>=3.8

requirements/doc/doc-requirements.txt

Lines changed: 1 addition & 0 deletions

0 commit comments

Comments
 (0)