Skip to content

Commit dec0ba7

Browse files
committed
Fix first plot
1 parent e965d04 commit dec0ba7

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

doc/users/index.rst

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,28 @@ User guide
1111
.. grid-item-card:: Starting information
1212
:padding: 2
1313

14-
.. raw:: html
15-
16-
<div class="grid__intro" id="image_rotator"></div>
17-
14+
.. plot::
15+
16+
x = np.linspace(0, 2, 100) # Sample data.
17+
18+
fig, ax = plt.subplots(figsize=(5, 2.7), layout='constrained')
19+
ax.scatter(x, np.random.randn(len(x)) + x**2,
20+
s=13 * np.random.rand(len(x)), c=np.random.randn(len(x)),
21+
label='noisy data')
22+
ax.plot(x, x, label='linear') # Plot some data on the axes.
23+
ax.plot(x, x**2, label='quadratic') # Plot more data on the axes...
24+
ax.plot(x, x**3, label='cubic') # ... and some more.
25+
ax.set_xlabel('x label') # Add an x-label to the axes.
26+
ax.set_ylabel('y label') # Add a y-label to the axes.
27+
ax.set_title("Simple plot") # Add a title to the axes.
28+
ax.legend() # Add a legend.
1829

1930
.. toctree::
2031
:maxdepth: 1
2132

2233
getting_started/index.rst
2334
installing/index.rst
2435
faq/index.rst
25-
resources/index.rst
2636

2737
.. grid-item-card:: Users guide
2838
:padding: 2
@@ -41,10 +51,12 @@ User guide
4151
../plot_types/index.rst
4252
../gallery/index.rst
4353
../tutorials/index.rst
54+
resources/index.rst
55+
4456

4557
.. raw:: html
4658

47-
<div class="grid__intro" id="image_rotator2"></div>
59+
<div class="grid__intro" id="image_rotator"></div>
4860

4961

5062
.. grid-item-card:: More information

0 commit comments

Comments
 (0)