Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > dc303dcad9fdd039290b4e78a58ed938 > files > 583

python-matplotlib-0.99.1.2-4.fc13.i686.rpm

import matplotlib.pyplot as plt
import numpy as np

ax = plt.axes([0.1, 0.3, 0.5, 0.5])

ax.pcolormesh(np.array([[1,2],[3,4]]))
plt.yticks([0.5, 1.5], ["long long tick label",
                        "tick label"])
plt.ylabel("My y-label")
plt.title("Check saved figures for their bboxes")
for ext in ["png", "pdf", "svg", "svgz", "eps"]:
    print "saving tight_bbox_test.%s" % (ext,)
    plt.savefig("tight_bbox_test.%s" % (ext,), bbox_inches="tight")
plt.show()