Skip to content

Commit f34fd6c

Browse files
committed
DOC: Minimal getting started page
1 parent 30b3bd5 commit f34fd6c

File tree

3 files changed

+68
-0
lines changed

3 files changed

+68
-0
lines changed

doc/_static/mpl.css

+13
Original file line numberDiff line numberDiff line change
@@ -231,3 +231,16 @@ table.property-table td {
231231
/* fix width to width of cheatsheet */
232232
width: 210px;
233233
}
234+
235+
/* Two columns for install code blocks */
236+
div.twocol {
237+
padding-left: 0;
238+
padding-right: 0;
239+
display: flex;
240+
}
241+
242+
div.twocol > div {
243+
width: 47%;
244+
padding: 0;
245+
margin: 0 20px 0 0;
246+
}

doc/users/getting_started.rst

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
Getting started
2+
===============
3+
4+
Installation
5+
------------
6+
7+
.. container:: twocol
8+
9+
.. container::
10+
11+
Install using pip:
12+
13+
.. code-block:: bash
14+
15+
pip install matplotlib
16+
17+
.. container::
18+
19+
Install using conda:
20+
21+
.. code-block:: bash
22+
23+
conda install matplotlib
24+
25+
Further details are available in the :doc:`Installation Guide </users/installing>`.
26+
27+
28+
Draw a first plot
29+
-----------------
30+
31+
Here is a minimal example plot you can try out:
32+
33+
.. plot::
34+
:include-source:
35+
:align: center
36+
37+
import matplotlib.pyplot as plt
38+
import numpy as np
39+
40+
x = np.linspace(0, 2 * np.pi, 200)
41+
y = np.sin(x)
42+
43+
fig, ax = plt.subplots()
44+
ax.plot(x, y)
45+
plt.show()
46+
47+
48+
Where to go next
49+
----------------
50+
51+
- Check out :doc:`Plot types </plot_types/index>` to get an overview of the
52+
types of plots you can to with Matplotlib.
53+
- Learn Matplotlib from the ground up in the
54+
:doc:`Quick-start guide </tutorials/introductory/usage>`.

doc/users/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Usage guide
1010
../plot_types/index.rst
1111
../tutorials/index.rst
1212
../gallery/index.rst
13+
getting_started.rst
1314
explain.rst
1415
../faq/index.rst
1516
../api/index.rst

0 commit comments

Comments
 (0)