Getting started — Matplotlib 3.9.2 documentation (original) (raw)

Installation quick-start#

Install using conda:

conda install -c conda-forge matplotlib

Further details are available in the Installation Guide.

Draw a first plot#

Here is a minimal example plot:

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()

(Source code, 2x.png, png)

If a plot does not show up please check Troubleshooting.

Where to go next#