Measures Concepts
GitHub icon

Matplotlib

Matplotlib - Library

< >

Matplotlib is an open source library created in 2003 by John D. Hunter.

Source code:
git clone https://github.com/matplotlib/matplotlib
#118on PLDB 21Years Old

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...


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

View source

- Build the next great programming language Search Add Language Features Creators Resources About Blog Acknowledgements Queries Stats Sponsor Day 605 feedback@pldb.io Logout