mirror of
https://github.com/kennethreitz-archive/pyinstaller.git
synced 2026-06-05 15:40:17 +00:00
03bcf72d90
git-svn-id: http://svn.pyinstaller.org/trunk@844 8dd32b29-ccff-0310-8a9a-9233e24343b1
26 lines
635 B
Python
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()
|