Getting started#
Installation quick-start#
pipinstallmatplotlib
condainstall-cconda-forgematplotlib
pixiaddmatplotlib
uvaddmatplotlib
Warning
uv usually installs its own versions of Python from thepython-build-standalone project, and only recent versions of thosePython builds (August 2025) work properly with thetkagg backendfor displaying plots in a window. Please make sure you are using uv0.8.7 or newer (update with e.g.uvselfupdate) and that yourbundled Python installs are up to date (withuvpythonupgrade--reinstall). Alternatively, you can use one of the othersupported GUI frameworks, e.g.
uvaddmatplotlibpyside6
Draw a first plot#
Here is a minimal example plot:
importmatplotlib.pyplotaspltimportnumpyasnpx=np.linspace(0,2*np.pi,200)y=np.sin(x)fig,ax=plt.subplots()ax.plot(x,y)plt.show()

If a plot does not show up please checkTroubleshooting.
Where to go next#
Check outPlot types to get an overview of thetypes of plots you can create with Matplotlib.
Learn Matplotlib from the ground up in theQuick-start guide.
On this page