8000 Merge pull request #21313 from timhoffm/getting-started · matplotlib/matplotlib@3557392 · GitHub
[go: up one dir, main page]

Skip to content
Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3557392

Browse files
authored
Merge pull request #21313 from timhoffm/getting-started
DOC: Minimal getting started page
2 parents ad95791 + 0dce1f4 commit 3557392

File tree

3 files changed

+69
-0
lines changed

3 files changed

+69
-0
lines changed

doc/_static/mpl.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,3 +231,17 @@ 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+
gap: 20px;
241+
}
242+
243+
div.twocol > div {
244+
flex-grow: 1;
245+
padding: 0;
246+
margin: 0;
247+
}

doc/users/getting_started.rst

Lines changed: 54 additions & 0 deletions
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 create with Matplotlib.
53+
- Learn Matplotlib from the ground up in the
54+
:doc:`Quick-start guide </tutorials/introductory/usage>`.

doc/users/index.rst

Lines changed: 1 addition & 0 deletions
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)
0