# Matplotlib

Matplotlib is an actively used library created in 2003. matplotlib is a plotting library for the Python programming language and its numerical mathematics extension NumPy. It provides an object-oriented API for embedding plots into applications using general-purpose GUI toolkits like Tkinter, wxPython, Qt, or GTK+. There is also a procedural "pylab" interface based on a state machine (like OpenGL), designed to closely resemble that of MATLAB, though its use is discouraged. Read more on Wikipedia...

17Years Old | 19,472Users | ?Jobs |

- Matplotlib ranks in the top 10% of entities I track
- the Matplotlib website
- the Matplotlib wikipedia page
- Matplotlib on github
- Matplotlib first appeared in 2003
- Matplotlib was created by John D. Hunter
- See also: python, numpy, qt, opengl, matlab, scipy, gnuplot, julia, octave, maxima, excel-app, jython, sagemath
- Have a question about Matplotlib not answered here? Email me and let me know how I can help.

### Example code from Wikipedia:

>>> from matplotlib import cm >>> from mpl_toolkits.mplot3d import Axes3D >>> import matplotlib.pyplot as plt >>> import numpy as np >>> fig = plt.figure() >>> ax = fig.gca(projection='3d') >>> X = np.arange(-5, 5, 0.25) >>> Y = np.arange(-5, 5, 0.25) >>> X, Y = np.meshgrid(X, Y) >>> R = np.sqrt(X**2 + Y**2) >>> Z = np.sin(R) >>> surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.coolwarm) >>> plt.show()

Last updated February 18th, 2020