You are reading an old version of the documentation (v1.5.1). For the latest version see https://matplotlib.org/stable/

We're updating the default styles for Matplotlib 2.0

Learn what to expect in the new updates

matplotlib

Travis-CI:

This Page

pylab_examples example code: matplotlib_icon.pyΒΆ

(Source code, png, hires.png, pdf)

../../_images/matplotlib_icon.png
"""
make the matplotlib svg minimization icon
"""
import matplotlib.pyplot as plt
import matplotlib
import numpy as np

matplotlib.rc('grid', ls='-', lw=2, color='k')
fig = plt.figure(figsize=(1, 1), dpi=72)
plt.axes([0.025, 0.025, 0.95, 0.95], axisbg='#bfd1d4')

t = np.arange(0, 2, 0.05)
s = np.sin(2*np.pi*t)
plt.plot(t, s, linewidth=4, color="#ca7900")
plt.axis([-.2, 2.2, -1.2, 1.2])

ax = plt.gca()
ax.set_xticklabels([])
ax.set_yticklabels([])

plt.show()

Keywords: python, matplotlib, pylab, example, codex (see Search examples)