"""
A simple, good-looking plot
===========================

Demoing some simple features of matplotlib
"""

import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt

fig = plt.figure(figsize=(5, 4), dpi=72)
axes = fig.add_axes([0.01, 0.01, .98, 0.98])
X = np.linspace(0, 2, 200)
Y = np.sin(2*np.pi*X)
plt.plot(X, Y, lw=2)
plt.ylim(-1.1, 1.1)
plt.grid()

plt.show()

[(10, 'matplotlib.use', 'matplotlib.use', False, 'import matplotlib\n'), (13, 'matplotlib.pyplot.figure', 'plt.figure', True, 'import matplotlib.pyplot as plt\n'), (15, 'numpy.linspace', 'np.linspace', True, 'import numpy as np\n'), (16, 'numpy.sin', 'np.sin', True, 'import numpy as np\n'), (17, 'matplotlib.pyplot.plot', 'plt.plot', True, 'import matplotlib.pyplot as plt\n'), (18, 'matplotlib.pyplot.ylim', 'plt.ylim', True, 'import matplotlib.pyplot as plt\n'), (19, 'matplotlib.pyplot.grid', 'plt.grid', True, 'import matplotlib.pyplot as plt\n'), (21, 'matplotlib.pyplot.show', 'plt.show', True, 'import matplotlib.pyplot as plt\n')]