Files
pyinstaller/buildtests/test-matplotlib_i.py
giovannibajo 03bcf72d90 Merge Python 2.6 for Windows support (py26win branch)
git-svn-id: http://svn.pyinstaller.org/trunk@844 8dd32b29-ccff-0310-8a9a-9233e24343b1
2010-05-21 00:07:21 +00:00

26 lines
635 B
Python

#!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy
from matplotlib import mlab
from matplotlib import pyplot
def main():
# Part of the example at
# http://matplotlib.sourceforge.net/plot_directive/mpl_examples/pylab_examples/contour_demo.py
delta = 0.025
x = numpy.arange(-3.0, 3.0, delta)
y = numpy.arange(-2.0, 2.0, delta)
X, Y = numpy.meshgrid(x, y)
Z1 = mlab.bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
Z2 = mlab.bivariate_normal(X, Y, 1.5, 0.5, 1, 1)
Z = 10.0 * (Z2 - Z1)
pyplot.figure()
CS = pyplot.contour(X, Y, Z)
pyplot.show()
if __name__ == "__main__":
main()