Skip to content

Commit

Permalink
Merge pull request matplotlib#21313 from timhoffm/getting-started
Browse files Browse the repository at this point in the history
DOC: Minimal getting started page
  • Loading branch information
dstansby authored Oct 9, 2021
2 parents ad95791 + 0dce1f4 commit 3557392
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 0 deletions.
14 changes: 14 additions & 0 deletions doc/_static/mpl.css
Original file line number Diff line number Diff line change
Expand Up @@ -231,3 +231,17 @@ table.property-table td {
/* fix width to width of cheatsheet */
width: 210px;
}

/* Two columns for install code blocks */
div.twocol {
padding-left: 0;
padding-right: 0;
display: flex;
gap: 20px;
}

div.twocol > div {
flex-grow: 1;
padding: 0;
margin: 0;
}
54 changes: 54 additions & 0 deletions doc/users/getting_started.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
Getting started
===============

Installation
------------

.. container:: twocol

.. container::

Install using pip:

.. code-block:: bash
pip install matplotlib
.. container::

Install using conda:

.. code-block:: bash
conda install matplotlib
Further details are available in the :doc:`Installation Guide </users/installing>`.


Draw a first plot
-----------------

Here is a minimal example plot you can try out:

.. plot::
:include-source:
:align: center

import matplotlib.pyplot as plt
import numpy as np

x = np.linspace(0, 2 * np.pi, 200)
y = np.sin(x)

fig, ax = plt.subplots()
ax.plot(x, y)
plt.show()


Where to go next
----------------

- Check out :doc:`Plot types </plot_types/index>` to get an overview of the
types of plots you can create with Matplotlib.
- Learn Matplotlib from the ground up in the
:doc:`Quick-start guide </tutorials/introductory/usage>`.
1 change: 1 addition & 0 deletions doc/users/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Usage guide
../plot_types/index.rst
../tutorials/index.rst
../gallery/index.rst
getting_started.rst
explain.rst
../faq/index.rst
../api/index.rst
Expand Down

0 comments on commit 3557392

Please sign in to comment.